Wes a088b17b80 feat: personas & skills — rename, import/export, creation, and layout fixes (#8)
* feat: personas, skills, and import/export improvements

- Rename "Agents" to "Personas" across the UI (sidebar, headings, descriptions)
- Load markdown persona files from ~/.goose/agents/ on startup with periodic
  refresh (60s interval + window focus), parsed from YAML frontmatter + body
- Implement persona import/export matching sprout's .persona.json v1 format
  with export from card menu and import via file picker
- Implement "New Skill" creation dialog with kebab-case validation, writing
  SKILL.md files to ~/.goose/skills/{name}/
- Add backend path traversal protection for skill name validation
- Fix persona creation to persist through backend API (was local-only)
- Fix import to refresh from backend instead of creating store duplicates
- Disable delete button for disk-loaded personas in the UI

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* feat: add edit, duplicate, export, and import for skills

- Add update_skill backend command to edit existing SKILL.md files
- Add export_skill command returning sprout-compatible .skill.json format
- Add import_skills command with file validation and name collision handling
- Convert CreateSkillDialog to support edit mode (read-only name, pre-filled fields)
- Add dropdown menu on skill cards with Edit, Duplicate, Export, Delete
- Add Import button with file picker on Skills page
- Duplicate generates unique {name}-copy suffix

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: make skills and personas pages fill full height with proper scrolling

Both pages now use flex column layout with h-full to fill the parent
container, and an inner scrollable wrapper with overflow-y-auto for
content overflow.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* style: fix cargo fmt and clippy warnings

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: delete persistence, confirmation dialogs, and export notifications

- Fix persona deletion to persist via backend API (was local-only)
- Add delete confirmation dialog for both personas and skills
- Show export notification toast with filename after successful export

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: hide delete option for built-in and disk-loaded personas

Instead of showing a disabled delete button, hide it entirely for
personas that can't be deleted (built-in and markdown-loaded).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* test: update PersonaCard test for hidden delete on built-in personas

The delete menu item is now hidden (not disabled) for built-in and
disk-loaded personas, so the test checks it's absent rather than disabled.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* test: add comprehensive tests for skills and persona features

- CreateSkillDialog: 17 tests (rendering, name validation, edit mode, form submission)
- SkillsView: 11 tests (rendering, search, card menu, delete confirmation)
- usePersonas hook: 6 tests (loading, CRUD, refresh)
- Agents API: 3 tests (export, import, refresh invoke calls)

Total test count: 100 → 137

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 14:31:33 -07:00
S
Description
No description provided
Apache-2.0 1.5 GiB
Languages
Rust 63.6%
TypeScript 29.6%
JavaScript 1.7%
Shell 1.6%
Python 1.5%
Other 1.8%