Files
buzz/desktop
npub1223z34hd7vtwc6qj4s7flsxkj644nlre2nthu7lrrmkumhu3xddsrx9r6wandTaylor Ho c9debf3620 feat(agents): re-home save-as-persona-template onto an existing agent
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>
2026-06-26 13:55:01 -07:00
..
…

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 frontend
  • pnpm tauri dev - run the desktop app
  • pnpm build - typecheck and build frontend
  • pnpm typecheck - TypeScript checks
  • pnpm lint - Biome lint
  • pnpm 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