Files
buzz/desktop/src/features/agents/ui/agentCreateIntent.ts
Will Pfleger 37bc962cb8 fix(desktop): always start agents and hide unavailable mesh (#1860)
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
Co-authored-by: npub1mn7jgtj4w2pd0g0zeuhxsa6jy6p0rewxz4kujt98my82ahfmp72sxjexk7 <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@sprout-oss.stage.blox.sqprod.co>
2026-07-14 17:08:47 -04:00

21 lines
772 B
TypeScript

/**
* What the user is creating from the unified create dialog.
*
* - `definition` — a keyless agent definition (persona record) only.
* - `definition_start` — definition plus an immediately created + spawned
* managed instance linked via `personaId` (today's quick-start flow).
*/
export type AgentCreateIntent = "definition" | "definition_start";
/**
* Default intent for callers that don't pass one. Un-migrated callers of
* `usePersonaActions.handleSubmit` (AgentDefinitionDialog's duplicate path
* until B3) must keep today's create-then-start semantics, so the default is
* `definition_start`, never `definition`.
*/
export function resolveCreateIntent(
intent?: AgentCreateIntent,
): AgentCreateIntent {
return intent ?? "definition_start";
}