mirror of
https://github.com/block/buzz.git
synced 2026-08-18 06:50:31 +02:00
Preserve hidden Welcome runtime aliases
Signed-off-by: kenny lopez <klopez4212@gmail.com>
This commit is contained in:
@@ -321,6 +321,36 @@ test("existing Welcome starter keeps its runtime when that harness is hidden", (
|
||||
);
|
||||
});
|
||||
|
||||
test("existing Welcome starter keeps an aliased runtime when that harness is hidden", () => {
|
||||
const existing = makeAgent({
|
||||
personaId: WELCOME_GUIDE_PERSONA_ID,
|
||||
agentCommand: "claude-code-acp",
|
||||
agentArgs: [],
|
||||
});
|
||||
|
||||
assert.equal(
|
||||
welcomeStarterRuntimeUpdate(
|
||||
existing,
|
||||
{
|
||||
name: "Fizz",
|
||||
agentCommand: "goose",
|
||||
agentArgs: [],
|
||||
mcpCommand: "",
|
||||
model: null,
|
||||
provider: null,
|
||||
},
|
||||
{
|
||||
runtimes: [
|
||||
{ id: "claude", command: "claude-agent-acp" },
|
||||
{ id: "goose", command: "goose" },
|
||||
],
|
||||
disabledRuntimeIds: ["claude"],
|
||||
},
|
||||
),
|
||||
null,
|
||||
);
|
||||
});
|
||||
|
||||
test("welcome team starter definitions and role identities are stable", () => {
|
||||
assert.equal(WELCOME_TEAM_ID, "builtin-team:welcome");
|
||||
assert.deepEqual(WELCOME_TEAM_STARTERS, [
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { commandsMatch } from "@/features/agents/agentReuse";
|
||||
import {
|
||||
buildInstanceInputForDefinition,
|
||||
resolveStartRuntimeForDefinition,
|
||||
@@ -246,8 +247,9 @@ export function welcomeStarterRuntimeUpdate(
|
||||
|
||||
const existingRuntime = visibility?.runtimes.find(
|
||||
(runtime) =>
|
||||
runtime.command?.trim() === existing.agentCommand.trim() ||
|
||||
runtime.id.trim() === existing.agentCommand.trim(),
|
||||
(runtime.command
|
||||
? commandsMatch(existing.agentCommand, runtime.command)
|
||||
: false) || commandsMatch(existing.agentCommand, runtime.id),
|
||||
);
|
||||
if (
|
||||
existingRuntime &&
|
||||
|
||||
Reference in New Issue
Block a user