Skip to main content

agent_def_hide

Function agent_def_hide 

Source
pub(crate) fn agent_def_hide(
    state: &AppState,
    cmd: CommandAgentDefHideData,
) -> Result<AgentDefHideResult, String>
Expand description

agentdefhide → set user_hidden = 1 on a seeded template, so it disappears from the picker’s “+ New from template” tier. Phase 2 (Q2 Decision Y) of SPEC_AGENT_PICKER_TWO_TIER_2026_05_24.md.

Validation:

  • definition_id MUST exist. Missing → returns { ok: false }.
  • The row MUST be a seeded template (is_seeded = 1). User-owned rows reject with a hard error — they have their own delete path and a hide flag on them would be misleading.

Broadcasts agents:changed so the picker refetches and the card disappears (existing list query already excludes hidden by default).