MCPcopy Create free account
hub / github.com/block/buzz / importPersonaDialogState

Function importPersonaDialogState

desktop/src/features/agents/ui/personaDialogState.ts:135–152  ·  view source on GitHub ↗
(
  persona: ParsedPersonaPreview,
)

Source from the content-addressed store, hash-verified

133}
134
135export function importPersonaDialogState(
136 persona: ParsedPersonaPreview,
137): PersonaDialogState {
138 return {
139 title: `Import ${persona.displayName}`,
140 description: "Review and create this imported agent.",
141 submitLabel: "Create agent",
142 initialValues: {
143 displayName: persona.displayName,
144 avatarUrl: importedAvatarUrl(persona),
145 systemPrompt: persona.systemPrompt,
146 runtime: persona.runtime ?? undefined,
147 model: persona.model ?? undefined,
148 provider: persona.provider ?? undefined,
149 ...(persona.namePool.length > 0 ? { namePool: persona.namePool } : {}),
150 },
151 };
152}

Callers 2

handleImportFileFunction · 0.90

Calls 1

importedAvatarUrlFunction · 0.85

Tested by

no test coverage detected