run an agent from the file browser

Right-click an entry and agents whose triggers match appear under their own Run Agent
submenu — deliberately not folded in with tasks, because an agent run is a chat session and
not a job, and one menu promising both would lie about what a click does. The modal shows the
absolute target path, autofills entry_path with it (tilde expansion stays the server's job),
and on Run links to /chat?cwd=<runs dir> instead of a queue entry: there is no job row to view.

Trigger matching and category grouping are now shared with tasks rather than duplicated, and
the task input form is reused as-is.

Rescan counts agents and invalidates their caches, so a new AGENT.md shows up on the button
rather than after the 60s staleTime.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-03 00:28:51 +00:00
co-authored by Claude Opus 5
parent 6b46d9f1f9
commit cc95f7fa17
11 changed files with 403 additions and 26 deletions
+1
View File
@@ -15,6 +15,7 @@ const CANONICAL: Record<ItemType, string> = {
tasks: 'TASK.md',
processes: 'PROCESS.md',
extensions: 'index.ts',
agents: 'AGENT.md',
};
function countItems(type: ItemType): number {