mirror of
https://github.com/block/buzz.git
synced 2026-11-27 11:41:21 +00:00
Refresh built-in personas: Solo, Kit, Scout + Kit & Scout team (#499)
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -392,6 +392,7 @@ type RawTeam = {
|
||||
name: string;
|
||||
description: string | null;
|
||||
persona_ids: string[];
|
||||
is_builtin: boolean;
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
};
|
||||
@@ -794,10 +795,10 @@ function resetMockPersonas() {
|
||||
updated_at: now,
|
||||
},
|
||||
{
|
||||
id: "builtin:ralph",
|
||||
display_name: "Ralph",
|
||||
id: "builtin:kit",
|
||||
display_name: "Kit",
|
||||
avatar_url: null,
|
||||
system_prompt: "You are Ralph.",
|
||||
system_prompt: "You are Kit.",
|
||||
is_builtin: true,
|
||||
is_active: false,
|
||||
created_at: now,
|
||||
@@ -813,16 +814,6 @@ function resetMockPersonas() {
|
||||
created_at: now,
|
||||
updated_at: now,
|
||||
},
|
||||
{
|
||||
id: "builtin:reviewer",
|
||||
display_name: "Reviewer",
|
||||
avatar_url: null,
|
||||
system_prompt: "You are Reviewer.",
|
||||
is_builtin: true,
|
||||
is_active: false,
|
||||
created_at: now,
|
||||
updated_at: now,
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
@@ -3846,6 +3837,7 @@ async function handleCreateTeam(args: {
|
||||
name: args.input.name.trim(),
|
||||
description: args.input.description?.trim() || null,
|
||||
persona_ids: [...args.input.personaIds],
|
||||
is_builtin: false,
|
||||
created_at: now,
|
||||
updated_at: now,
|
||||
};
|
||||
@@ -3876,6 +3868,10 @@ async function handleUpdateTeam(args: {
|
||||
}
|
||||
|
||||
async function handleDeleteTeam(args: { id: string }): Promise<void> {
|
||||
const team = mockTeams.find((candidate) => candidate.id === args.id);
|
||||
if (team?.is_builtin) {
|
||||
throw new Error("Built-in teams cannot be deleted.");
|
||||
}
|
||||
mockTeams = mockTeams.filter((candidate) => candidate.id !== args.id);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user