mirror of
https://github.com/block/buzz.git
synced 2026-08-18 06:50:31 +02:00
Signed-off-by: Will Pfleger <pfleger.will@gmail.com> Co-authored-by: npub1mn7jgtj4w2pd0g0zeuhxsa6jy6p0rewxz4kujt98my82ahfmp72sxjexk7 <dcfd242e557282d7a1e2cf2e6877522682f1e5c6156dc92ca7d90eaedd3b0f95@sprout-oss.stage.blox.sqprod.co>
21 lines
772 B
TypeScript
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";
|
|
}
|