mirror of
https://github.com/block/buzz.git
synced 2026-08-18 06:50:31 +02:00
Adds a 'Save as persona template' action to an existing agent's menus, re-homing the #1301 logic onto main's surfaces: - saveAsPersonaTemplateDialogState() prefills the persona editor from a ManagedAgent, reverse-mapping the agent's harness command to a runtime id via commandsMatch (graceful fallback to no runtime). provider is omitted intentionally: ManagedAgent has no top-level provider field on main, so there is nothing lossless to carry. - useSaveAsPersonaTemplate() is a self-contained hook (dialog + mutation) so a later visual reskin can move the trigger without untangling the behavior. Derives dialog state from agent + live runtimes via a memo to avoid the lazy-runtime-query first-open race. - Wired into ManagedAgentRow's actions menu (gated personaId === null) and the sidebar agent profile (gated canEditAgent + persona-less). - personaLibraryCopy.ts documents the UI<->backend vocabulary boundary: 'persona template' is the product term for a backend persona (kind:30175). Tests cover the dialog-state mapping: vocabulary, command reverse-map hit, miss/empty-catalog fallback, null-command catalog entries, field carry-over, provider omission, and null systemPrompt/model tolerance. Co-authored-by: Taylor Ho <taylorkmho@gmail.com> Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Buzz
Desktop chat shell with:
- Tauri + React + TypeScript + Vite
- Tailwind CSS
- shadcn/ui-ready shared components
- Biome (lint/format/check)
- Feature-driven frontend structure
Scripts
pnpm dev- run the web frontendpnpm tauri dev- run the desktop apppnpm build- typecheck and build frontendpnpm typecheck- TypeScript checkspnpm lint- Biome lintpnpm format- Biome format (write)pnpm check- Biome check
Structure
src/shared- reusable app-wide code (ui,lib,styles)src/features- feature modules (vertical slices)src/app- top-level app composition