mirror of
https://github.com/block/buzz.git
synced 2026-11-10 11:21:05 +00:00
## Summary - Rename the built-in Bumble agent to Pollen across desktop, onboarding, docs, and test fixtures. - Migrate existing stock definitions and instances in place while preserving customized fields and the stable persona coordinate. - Reserve the Pollen name by removing it from Fizz's generated-name pool. ## Validation - Pre-push desktop checks, typecheck, 4,791 frontend tests, Tauri clippy, and 2,432 native tests - Desktop E2E build --------- Signed-off-by: kenny lopez <klopez4212@gmail.com> Signed-off-by: Kenny Lopez <klopez4212@gmail.com> Signed-off-by: Wes <wesbillman@users.noreply.github.com> Co-authored-by: Carl <3c4caeafb646d23867f1c4832e68211d77e2561946171625f75c3ce1a3f2670f@buzz.block.builderlab.xyz> Co-authored-by: Wes <wesbillman@users.noreply.github.com> Co-authored-by: Carl <c7ebe626f000404285d3686e1dc74cc07cc60a9754a150041ba132e14bd3e2ec@buzz.block.builderlab.xyz>
78 lines
2.0 KiB
JavaScript
78 lines
2.0 KiB
JavaScript
import assert from "node:assert/strict";
|
|
import test from "node:test";
|
|
|
|
import { pickQuickBotPersonas } from "./useBotRecents.ts";
|
|
|
|
function createPersona(id, displayName) {
|
|
return {
|
|
id,
|
|
displayName,
|
|
avatarUrl: null,
|
|
systemPrompt: `${displayName} prompt`,
|
|
runtime: null,
|
|
model: null,
|
|
isBuiltIn: true,
|
|
isActive: true,
|
|
createdAt: "2026-01-01T00:00:00Z",
|
|
updatedAt: "2026-01-01T00:00:00Z",
|
|
};
|
|
}
|
|
|
|
test("pickQuickBotPersonas prefers recents before defaults", () => {
|
|
const personas = [
|
|
createPersona("builtin:fizz", "Fizz"),
|
|
createPersona("builtin:reviewer", "Reviewer"),
|
|
];
|
|
|
|
assert.deepEqual(
|
|
pickQuickBotPersonas(personas, ["builtin:reviewer"]).map(
|
|
(persona) => persona.id,
|
|
),
|
|
["builtin:reviewer", "builtin:fizz"],
|
|
);
|
|
});
|
|
|
|
test("pickQuickBotPersonas seeds the three starter agents", () => {
|
|
const personas = [
|
|
createPersona("builtin:bumble", "Pollen"),
|
|
createPersona("builtin:honey", "Honey"),
|
|
createPersona("builtin:fizz", "Fizz"),
|
|
createPersona("builtin:reviewer", "Reviewer"),
|
|
];
|
|
|
|
assert.deepEqual(
|
|
pickQuickBotPersonas(personas, []).map((persona) => persona.id),
|
|
["builtin:fizz", "builtin:honey", "builtin:bumble"],
|
|
);
|
|
});
|
|
|
|
test("pickQuickBotPersonas falls back to any active personas when defaults are missing", () => {
|
|
const personas = [
|
|
createPersona("builtin:reviewer", "Reviewer"),
|
|
createPersona("custom:planner", "Planner"),
|
|
createPersona("custom:writer", "Writer"),
|
|
];
|
|
|
|
assert.deepEqual(
|
|
pickQuickBotPersonas(personas, []).map((persona) => persona.id),
|
|
["builtin:reviewer", "custom:planner", "custom:writer"],
|
|
);
|
|
});
|
|
|
|
test("pickQuickBotPersonas skips duplicate and missing recents", () => {
|
|
const personas = [
|
|
createPersona("builtin:fizz", "Fizz"),
|
|
createPersona("custom:honey", "Honey"),
|
|
];
|
|
|
|
assert.deepEqual(
|
|
pickQuickBotPersonas(personas, [
|
|
"builtin:fizz",
|
|
"missing",
|
|
"builtin:fizz",
|
|
"custom:honey",
|
|
]).map((persona) => persona.id),
|
|
["builtin:fizz", "custom:honey"],
|
|
);
|
|
});
|