Commit Graph
624 Commits
Author SHA1 Message Date
Willie 40347477d5 fix(audit): scan all agents including disabled ones
Security audit should scan ALL agents regardless of .agentignore
status — disabled agents may still contain threats.
2026-04-09 14:49:24 +08:00
Willie 1b9ba78719 fix(audit): scan agents as individual files, not directories
Agents are individual .md files discovered by resource.AgentKind{}.Discover(),
but audit was using collectInstalledSkillPaths() which calls
sync.DiscoverSourceSkillsLite() — designed for skill directories. Then
ParallelScan() called ScanSkill() which expects directories, not files.

Changes:
- Add IsFile flag to audit.SkillInput; when set, ParallelScan uses
  ScanFile/ScanFileForProject instead of ScanSkill variants
- Add collectInstalledAgentPaths() using resource.AgentKind{}.Discover()
  and resource.ActiveAgents() for proper agent file discovery
- Add toAgentAuditInputs() helper that sets IsFile=true
- Branch on kindAgents in auditInstalled(), auditFiltered(), and
  launchAuditTUIWithTabs() to use agent-specific discovery and inputs
- Add discoverAuditAgents() in server handler and update
  resolveAuditSource() to return isAgents flag
- Update handleAuditAll, handleAuditStream to use agent-aware discovery
  and build SkillInput with IsFile=true for agents
2026-04-09 14:45:24 +08:00
Willie 86461ecc7d feat(audit): add Skills/Agents tab switching to TUI
Two-tab TUI following list_tui.go pattern. Tab/Shift+Tab cycles
between Skills and Agents tabs. Initial tab matches CLI argument.
Secondary kind scanned lazily when TUI launches via auditTUIContext.

Also adds agentsSourcePath param to auditInstalled/auditFiltered
and launchAuditTUIWithTabs helper for dual-kind scanning.
2026-04-09 14:31:14 +08:00
Willie c6f24ab34a feat(audit): dynamize skill/agent terminology in CLI output
Thread kind parameter through auditInstalled, auditFiltered, and
auditSkillByName. All output text now uses Noun() for correct
skill(s)/agent(s) display. Set Result.Kind on all scan results.

Also update audit_project.go callers to pass kindSkills.
2026-04-09 14:23:20 +08:00
Willie baf6b181ae feat(audit): add Kind field to Result, Noun helpers to kind_filter, remove --all flag
- audit.Result gains a Kind string field ("skill"|"agent", set by caller)
  so callers can tag results for display without touching the scan engine
- resourceKindFilter gets Noun(count) and SingularNoun() helpers to produce
  correct singular/plural display nouns per resource type
- audit command switches from parseKindArgWithAll to parseKindArg, dropping
  the --all flag and its two help-text lines; agents subcommand is the way
  to target agents explicitly
2026-04-09 14:18:28 +08:00
Willie 30da704406 fix(sync): pass -g flag to cmdSyncExtras in global --all mode
Without the explicit -g flag, cmdSyncExtras falls back to auto-detection
which picks project mode when cwd contains .skillshare/config.yaml,
causing 'sync --all -g' to display project extras messages instead of
global ones. Mirrors the project-mode path that already passes -p.
2026-04-09 04:11:31 +08:00
Willie 5836a8802f feat: add agent filter support to Filter Studio, targets CLI, and overview API
Backend:
- PATCH /api/targets/:name accepts agent_include/agent_exclude fields
- POST /api/sync-matrix/preview returns agent entries with kind=agent
- GET /api/overview returns agentsSource and extrasSource paths
- Fix ResolveProjectTargets to resolve Agents sub-key (path + filters)
- Add agent filter CLI flags: --add-agent-include, --add-agent-exclude,
  --remove-agent-include, --remove-agent-exclude, --agent-mode
- Unify target list JSON/TUI to show agent info and filters

Frontend:
- FilterStudioPage: kind-driven single-context view (?kind=skill|agent)
- KindBadge: use design system tokens (ss-badge + wobble in playful)
- TargetsPage: link to Filter Studio with ?kind= param
- ResourceDetailPage: capitalize type labels (Local, GitHub)
- ResourcesPage: sync activeTab from URL searchParams on navigation
- DashboardPage: show agents/extras source dirs, link skills card
  with ?tab=skills for reliable tab switching
- API client: extend updateTarget and previewSyncMatrix for agent filters

Tests:
- Agent include/exclude round-trip persistence
- Invalid agent pattern returns 400
- Preview with agent entries and kind field
- No agent entries for targets without agent path
- CLI target agent filter integration tests
2026-04-09 03:50:28 +08:00
Willie f5af6c3909 feat(ui): unify skills/agents under /resources route and API
- Rename route /skills → /resources (pages, detail, new)
- Rename API /api/skills → /api/resources with response keys
  skills → resources, skill → resource
- Rename SkillDetailPage → ResourceDetailPage, variable skill → resource
- KindBadge: show full 'Skill'/'Agent' text, remove size prop
- Show 'local' type badge when source type is empty
- Dashboard: remove Sync Mode stat card, use 4-col grid
- Resources: remove redundant Skills/Agents filter chips (tabs handle it)
- Agent audit: add ?kind=agent support to /api/audit endpoint
- Agent sync matrix: include agents in /api/sync-matrix with
  builtin target path fallback and include/exclude filtering
- FilterAgents: new function in internal/sync/filter.go
- Agent sync: apply include/exclude filters before syncing
2026-04-09 01:26:30 +08:00
Willie 081348d39b refactor(collect): unify skills/agents flow with collectPlan + generics
Replace duplicated runCollectSkills/runCollectAgents (~110 lines of 95%
identical code) with a single runCollectPlan function driven by a
collectPlan struct + toCollectResources[T] generic converter.

Key changes:

- Add collectPlan/collectResources types and runCollectPlan unified flow
- Add toCollectResources[T] generic to bridge typed slices into the
  shared pipeline (scan → display → dry-run → confirm → pull → render)
- Replace fragile err.Error() == "already exists in source" string
  matching with ErrAlreadyExists sentinel error + errors.Is()
- Move os.MkdirAll from per-agent PullAgent to PullAgents (call once)
- Add FindLocalAgents/PullAgent/PullAgents to match FindLocalSkills API
- Add target selection, --force/--dry-run/--json support for agent collect
- Add integration tests for agent collect (target filter, dry-run, force,
  JSON, oplog, project mode)
- Update collect.md, agents.md, ui.md docs for agent collect support
2026-04-09 00:36:39 +08:00
Willie 6e9177aae0 style: fix gofmt alignment in test files 2026-04-08 22:42:35 +08:00
Willie 9eaaae5295 feat(backup): auto backup agents before sync in global and project mode
Add agent auto backup to syncAgentsGlobal and syncAgentsProject so that
agent targets are backed up before destructive sync operations, matching
the existing auto backup behavior for skills.

Previously only 'skillshare sync' (skills path) and 'target remove'
had auto backup for agents (added in 693f75cc). The agent-only sync
paths ('skillshare sync agents' and 'skillshare sync agents -p') had
no auto backup at all.
2026-04-08 22:40:36 +08:00
Willie 693f75cc12 refactor: deduplicate agent path resolution and add agent backup to sync/target
Extract resolveAgentBackupPath() in restore_tui.go to replace 3 identical
inline agent path resolution blocks (~30 lines removed). The new helper
delegates to the canonical resolveAgentTargetPath() with builtin fallback.

Add agent directory backup before sync (backupTargetsBeforeSync) and
before target removal (backupTargets) so agent data is preserved alongside
skill backups. Extract resolveGlobalAgentBackupContextFromCfg to avoid
redundant config.Load() when config is already available.
2026-04-08 22:38:56 +08:00
Willie 36ee2fe15f fix: tone down doctor target colors — only status word is colored
Split status word from detail in displayTargetStatus. Only the status
word (merged/drift/linked) gets color, detail text uses dim. Reduces
the "wall of green" effect in doctor output.
2026-04-08 22:26:18 +08:00
Willie 2d1a370fef fix: use merged instead of synced for agent status
Agents use merge mode (symlinks), so show "merged" to be consistent
with the skills status terminology.
2026-04-08 22:21:11 +08:00
Willie 1dbfc84e5f fix: show [merge] mode in agent sub-items for status and doctor
Agents always use merge mode (symlink-per-file). Add [merge] prefix to
agent sub-item detail in status and doctor for consistency with skills.

Also refactor doctor displayTargetStatus to use sub-item format
(target name as header, skills/agents as indented sub-items).
2026-04-08 22:19:20 +08:00
Willie fa08916e3f fix: merge doctor extras check into single line per extra
Combine "source exists" and "targets reachable" into one line:
  ✓ rules: 4 files, 1/1 targets OK
Only show target details when there are unreachable targets.
2026-04-08 22:16:55 +08:00
Willie 6abfa47712 refactor: integrate agent checks into doctor targets section
Move agent target checks from standalone "Checking environment" output
into the "Checking targets" section as indented sub-items under each
target, matching the unified layout from status.

Also fix project mode doctor using wrong agents source path
(was falling back to global instead of project .skillshare/agents/).
2026-04-08 22:16:03 +08:00
Willie 1ff4360eb5 fix: keep (project) label on Source header only 2026-04-08 22:03:03 +08:00
Willie bc31eb2384 fix: remove leading spaces from target name in status output
Target name now starts at column 0, sub-items indented 2 spaces.
2026-04-08 22:00:24 +08:00
Willie a726e363fc refactor: redesign status output — unified layout with agents in targets
Restructure status command output for both -g and -p modes:

- Remove "(project)" suffix from all section headers (logo already shows it)
- Merge agents source info into Source section alongside skills
- Show agents as sub-items under each target instead of a separate section
- Remove standalone printAgentStatus/printProjectAgentStatus (dead code)
- Simplify cmdStatus: remove kind parameter since status always shows all
- JSON output unchanged (backward compatible)
2026-04-08 21:55:32 +08:00
Willie 89d40afd55 feat(diff-tui): single-line items with group headers
- Switch delegate to single-line mode (showDesc: false) with ▌ prefix bar
- Merge description info into Title() for both target and extra items
- Add ─ Targets (N) ── and ─ Extras (N) ── group headers with counts
- Add spacer row between Targets and Extras sections
- Skip separator on initial selection and filter reset
- Update status test to reflect always-show-both behavior
2026-04-08 21:40:09 +08:00
Willie 525ae0b9f4 refactor: status always shows both skills and agents
Remove kind filter (agents/--all) from status command — it now defaults
to showing everything, matching diff behavior. Status is a read-only
overview command; users expect the full picture without extra flags.

- Remove parseKindArgWithAll from cmdStatus, hardcode kindAll
- Update help text and usage examples
- Simplify tests: merge agents/all variants into default tests
- Update runbook steps 9-11 → 9-10
2026-04-08 21:40:03 +08:00
Willie eadfcf3d6f refactor: replace positional "all" keyword with --all flag for kind filter
Migrate from "ss list all" syntax to "ss list --all" across all commands
that support kind filtering (list, sync, status, check, audit, backup,
restore, trash).

- Remove "all" as a recognized positional keyword in parseKindArg
- Add extractAllFlag and parseKindArgWithAll helpers
- Update help text, usage examples, and runbook
- Update all integration tests to use --all flag
2026-04-08 21:31:41 +08:00
Willie 8dff3dfcc9 refactor: pass trash dir to cmdUninstallAgents and update help text
- Accept trashBase parameter in cmdUninstallAgents instead of
  hardcoding AgentTrashDir(), enabling correct project vs global
  trash routing from all call sites
- Use displayName (not internal t.Name) when trashing agents
- Sort list by RelPath instead of Name so grouped skills stay together
- Update printUsage to reflect agent support across commands
  (list, sync, check, update, diff, collect, trash, audit)
2026-04-08 20:57:44 +08:00
Willie 43c5154a78 Flatten nested agent sync names
Align agent target naming with the skills-style __ flattening so nested agents do not collide by basename in flat agent directories. Add unit and project-mode integration coverage to verify repeated syncs stay stable and no longer report false updates.
2026-04-08 20:52:29 +08:00
Willie 27f352e5d2 fix: resolve relative paths in project mode extras and agent targets
Extract resolveProjectPath() helper to centralize ~ expansion and
relative-to-project-root resolution. Fixes extras sync and agent
target path resolution in project mode when paths are relative.

Add integration tests for sync --all agents/extras overlap detection
in both global and project modes.
2026-04-08 18:35:36 +08:00
Willie 585b3cdde7 feat(tui): add [S]/[A] kind prefix in All tab and group by kind
In the All (resources) tab:
- Show [S] prefix for skills and [A] prefix for agents
- Group items by kind: skills first, agents second
- Each kind block preserves original repo grouping with
  kind-prefixed headers (e.g. 'Skills · standalone')

In Skills/Agents tabs: no prefix shown (context is clear).

Detail panel now shows 'Skill' or 'Agent' kind label in the
status bits alongside remote/local/tracked.

Spinner message is now tab-aware: 'Loading resources/skills/agents'.

Implementation uses a shared *listTab pointer between the model
and delegate so the delegate reads current tab state without
needing SetDelegate() on every tab switch.
2026-04-08 18:35:17 +08:00
Willie 7552c76973 refactor: eliminate sidecar reads and use centralized metadata store
Production code no longer reads or writes .skillshare-meta.json sidecars:
- InstallAgentFromDiscovery: write to centralized store via WriteMetaToStore
- agent_check.go: read from centralized store passed as parameter
- handler_skills.go: read agents from s.agentsStore
- audit.go: readMetaFileHashes reads from parent .metadata.json
- analyzer_metadata.go: extract findMetaEntry to deduplicate walk logic
- uninstall_agents.go: remove entry from centralized store on uninstall
- batchUpdateAgents: pass store to reinstallAgent, remove dead field
- Replace LoadMetadata+nil guard with LoadMetadataOrNew across 6 files
2026-04-08 17:43:30 +08:00
Willie b5266574a7 fix: rewrite agent update to use discovery + single-file installer
reinstallAgent previously called install.Install() which expects
directory-based skill installation. Agent sources point to .md files,
so the subdir resolver rejected them.

Now uses DiscoverFromGit/DiscoverFromGitSubdir + InstallAgentFromDiscovery
which correctly handles single-file agent copies. Also preserves the
original repo subdir scope for monorepo installs and reconstructs the
correct destination subdirectory for grouped agents.
2026-04-08 16:35:35 +08:00
Willie 4af128fcf0 fix: migrate metadata consumers from Get(basename) to GetByPath
All call sites that looked up metadata entries using filepath.Base()
now use store.GetByPath(relPath) which handles both full-path keys
and legacy basename+group keys transparently.

Also fixes makeInstallOpts() to set SourceDir from updateContext,
preventing nested skill updates from writing metadata to wrong dir.
2026-04-08 16:35:27 +08:00
Willie 2acfec82ec refactor: simplify metadata — extract helpers, remove dual-write, add kind constants
Code quality fixes from review:
- Extract RemoveByNames() to eliminate copy-paste in uninstall Phase 7
- Add MetadataKindSkill/MetadataKindAgent constants
- Remove dual-write shim (findSkillsRoot + writeMetaToCentralized)
- install_apply.go uses WriteMetaToStore with SourceDir (no sidecar)
- Move LoadMetadata out of walk loops (P0 efficiency fix)
- isGroupDir accepts store parameter to avoid redundant loads
- Add SourceDir to InstallOptions for --into group support
2026-04-08 15:00:22 +08:00
Willie e91890d2b0 test: fix all integration tests for centralized .metadata.json format
- Dual-write in WriteMeta: also writes to .metadata.json for backward compat
- Migration looks in parent dir for registry.yaml
- Group uninstall matches entries by Group field + full path
- Sync test uses MetadataStore instead of registry.yaml
- All integration tests pass (0 FAIL)
2026-04-08 14:28:57 +08:00
Willie ed1beb1ccb refactor: replace all remaining ReadMeta/LoadRegistry with MetadataStore
Replace every remaining call to the old per-skill metadata API
(ReadMeta, RefreshMetaHashes, config.LoadRegistry) with the centralized
MetadataStore across 10 files:

Server handlers:
- handler_check.go: use s.skillsStore.Get() instead of ReadMeta
- handler_check_stream.go: same pattern as handler_check.go
- handler_skills_batch.go: use s.skillsStore.RefreshHashes() + Save()

CLI commands:
- check.go: load store once in collectCheckItems, use MetadataEntry
- doctor.go: load store once in checkSkillIntegrity
- list.go: load store once in buildSkillEntries (replaces parallel ReadMeta)
- uninstall.go: use skillsStore for display/dry-run/finalize
- uninstall_project.go: same pattern, remove config.LoadRegistry
- update_batch.go: pruneRegistry now uses MetadataStore

Hub:
- hub/index.go: load store once in BuildIndex

The only remaining ReadMeta call is in a test file
(search_batch_meta_roundtrip_test.go) which tests the shim itself.
2026-04-08 11:19:27 +08:00
Willie e62f729f18 refactor: partial uninstall migration to MetadataStore 2026-04-08 11:08:24 +08:00
Willie ad05ed9a2f refactor: replace ReadMeta in update handlers with MetadataStore
update.go, update_handlers.go, update_project.go, update_resolve.go
now use MetadataStore.Get() instead of per-skill ReadMeta.
2026-04-08 11:04:28 +08:00
Willie 1f1790b6be refactor: replace Registry with MetadataStore in reconcile, server, install context
Phase 1 of caller migration:
- projectRuntime: registry → skillsStore + agentsStore
- globalInstallContext: reg → store
- ReconcileGlobalSkills/ProjectSkills/ProjectAgents: take *MetadataStore
- Server struct: registry → skillsStore + agentsStore
- handler_install, handler_skills, handler_uninstall: use MetadataStore
- install.go, search.go: post-install reconciliation via MetadataStore
2026-04-08 10:59:13 +08:00
Willie ebcfaf6bc4 feat(agents): add --group support, fix nested discovery, and improve TUI dispatch
- CheckAgents uses recursive discovery via resource.AgentKind{}.Discover()
  so nested agents (e.g. demo/code-reviewer.md) are found correctly
- Add --group/-G flag to update, check, and uninstall agents commands
  with shared validateAgentGroups/matchesAnyGroup helpers
- Fix TUI project-mode dispatch: call cmdUpdateAgentsProject and
  cmdUninstallAgents directly instead of passing 'agents' keyword to
  handlers that don't understand it
- TUI confirmation overlay shows correct command with 'agents' keyword
  and confirmKind field tracks skill vs agent
- TUI toggleDisabled (E key) writes to .agentignore for agents instead
  of .skillignore
- Agent Discover now marks .agentignore matches as Disabled=true instead
  of skipping them, so disabled agents appear in list with [disabled] tag
- Sync filters out disabled agents via resource.ActiveAgents()
- auditSkillByName uses scanPathTarget to support single-file agent audit
- Uninstall agents display uses RelPath (e.g. demo/tutor) instead of
  frontmatter name (e.g. Python Tutor Expert)
2026-04-08 02:37:42 +08:00
Willie 49d33938a2 feat(sync): skip extras 'agents' targets that overlap with agents sync
When extras has an entry named 'agents' whose target paths overlap with
the resolved agent target paths from targets.yaml, the extras targets
are skipped with a warning — the agents sync system takes priority.

Detection uses dual conditions: extras name == 'agents' AND resolved
path overlap. Non-'agents' extras targeting agent paths are unaffected.
Agents source must exist with actual files; empty/missing source means
no overlap (extras sync normally).

Also fixes:
- CheckAgents now recurses into subdirectories via resource.AgentKind
- update agents resolves nested agent names via filepath.Base
- filterAgentCheckResults matches both full path and basename
2026-04-07 22:35:59 +08:00
Willie 34c275a2b8 fix(sync): remove extra indent between checkmark and path in extras output 2026-04-07 22:09:51 +08:00
Willie 3241159b56 style(sync): unify summary format and headers across skills, agents, extras
- Replace ui.Info() agent summary with ui.AgentSyncSummary() using
  OperationSummary pattern (colored metrics, consistent spacing)
- Add ui.ExtrasSyncSummary() call to extras sync (was missing summary)
- Unify section headers: 'Syncing X' / 'Syncing X (project)' pattern
- Remove extra fmt.Println() before extras to fix double blank lines
- Rename agentSyncStats.skipped to .local to match UI semantics
2026-04-07 22:05:34 +08:00
Willie 5afaf57745 feat(tui): add tab switching between skills/agents in list TUI
- Add Tab/Shift+Tab to cycle All/Skills/Agents tabs with count badges
- Tab bar renders at top with bold+underline cyan active, dim inactive
- Tab acts as pre-filter composing with text filter via AND logic
- Cache tab-filtered items in applyFilter() to avoid per-frame recomputation
- Add tabNoun() method to consolidate noun switches across title/filter bar

Agent install --into support:
- Support --into flag for agent install (CLI, server, project mode)
- Support --into=value syntax in addition to --into value
- Server handler_skills uses recursive AgentKind.Discover() for nested agents
- Fix agent metadata read path: use file basename instead of frontmatter name
- Sync --all flag now includes agent sync (not just extras)

Agent content viewer:
- Agents render full-width without sidebar (single .md file, no tree needed)
- Simplified help text and keyboard handling for agent content view

Agent uninstall fixes:
- Use discovery-based resolution instead of hardcoded name+.md path lookup
- Support matching by Name, FlatName, RelPath, or trimmed RelPath
- Compressed confirmation display (list format, max 20 shown)

UI polish:
- Help bar keys highlighted in dim cyan, descriptions in dim gray
- Align 'No items.' text with list title via PaddingLeft(2)
2026-04-07 21:55:05 +08:00
Willie 9d934f87d3 fix: pass AgentsSource to Config in project mode install
Without this, installDiscoveredAgents in project mode falls back to
the global agents path (~/.config/skillshare/agents/) instead of the
project agents path (.skillshare/agents/).
2026-04-07 20:45:40 +08:00
Willie 73d4d32dfe feat(sync): warn when targets are skipped for agents (no agents path)
Both syncAgentsGlobal and syncAgentsProject now collect target names
where agentPath is empty and print a summary warning after the sync
summary line. This makes it visible to users which targets were
silently skipped, helping them configure agents paths if desired.
2026-04-07 20:22:30 +08:00
Willie e2a3d7024c fix: install agents from mixed repos after skills
Mixed repos containing both skills/ and agents/ directories previously
only installed skills, silently ignoring agents. Now after every skill
install exit point, discovered agents are also installed to the agents
source directory.

- Add installDiscoveredAgents helper that installs agents post-skills
- Update 'Found' message to show agent count in mixed repos
- Call helper at all 4 skill install exit points in handleGitInstall
- Add integration test for mixed-repo install scenario
2026-04-07 20:20:21 +08:00
Willie 9f77ac0b61 feat(install): add TUI multi-select and batch progress for agent install
Pure-agent repos now show a checklist TUI for selecting which agents
to install (matching the skill install flow). Supports:
- Single agent: direct install (no TUI)
- Multi-agent: interactive checklist TUI (space/a/enter)
- --all/--yes: install all without prompt
- -a name1,name2: filter by name without prompt
- --dry-run: preview list
- Non-TTY: error with hint to use flags
- Batch progress: spinner (<=20) or progress bar (>20)
- Results display: installed/failed/skipped sections
2026-04-07 19:47:59 +08:00
Willie 91057c1756 feat(install): detect and install agents from pure-agent repos
When a repo has no SKILL.md files but contains .md agents (discovered
via Rule 4 fallback in discovery layer), the CLI now installs them
instead of showing 'No skills found'.

Adds handleAgentInstall() which:
- Respects --agent name filter
- Uses InstallAgentFromDiscovery() (same as UI flow)
- Supports --dry-run and --force
- Shows next-steps hint to run 'sync agents'
2026-04-07 19:35:16 +08:00
Willie 98bd7d7fc2 feat(tui): show agent diffs with [A] badge in diff TUI
Merge agent diffs into skill diff results so both appear together
in the diff TUI. Agent entries display a cyan [A] badge prefix
in the detail panel's category listings.

Changes:
- Add mergeAgentDiffsGlobal/mergeAgentDiffsProject helpers that
  compute agent diffs and merge them into per-target skill results
- Call merge helpers in cmdDiffGlobal and cmdDiffProject before
  TUI/output rendering
- Build agent name set in buildDiffDetail and render [A] badge
  for agent entries in category expansion
- Fix categorizeItems to handle agent-specific reasons
  ('not in target' → New, 'local file' → Local Only)
2026-04-07 19:04:35 +08:00
Willie 11aebd2876 feat(tui): show agent badge and route agent restore in backup restore TUI
Add [A] badge to agent backup entries in the target list, and resolve
the correct agent target path when restoring. Agent backups (entries
ending with -agents) now look up AgentsConfig or fall back to builtin
DefaultAgentTargets for path resolution, both in the restore action
and in the detail/diff panels.
2026-04-07 19:02:56 +08:00
Willie dc4ef279c0 feat(tui): add agent badge and correct restore routing in trash TUI 2026-04-07 18:59:35 +08:00
Willie a941b617f8 feat(tui): support agent content viewing in list detail panel
Agents are single .md files, not directories. The content viewer now:
- Detects agent vs skill via contentKind field on the model
- Renders agent .md content directly (no directory walk)
- Shows a single-file tree entry for the agent
- Resolves file paths from agentsSourcePath for agents
2026-04-07 18:54:35 +08:00