diff --git a/docs/zeus-parallel-agents-ui.md b/docs/zeus-parallel-agents-ui.md new file mode 100644 index 00000000..9914d074 --- /dev/null +++ b/docs/zeus-parallel-agents-ui.md @@ -0,0 +1,63 @@ +# Parallel agents UI + +Multiple Zeus subagents run concurrently. Each one needs a visible, cancellable, observable surface — but **never as the editor's primary view**. + +This is the deliberate counter-positioning vs Cursor 3 / Antigravity 2.0 / Windsurf Cascade, all of which made the agent manager the home screen. The market signal (Pragmatic Engineer Feb 2026: Claude Code "most loved" 46%, more than 2× Cursor) says many senior developers prefer agents as a tool, not as their workflow's center. + +## Where the UI lives + +An **auxiliary bar view** (the right-side container in VS Code's workbench — formally "auxiliary bar"; the "side bar" is the left-side container by VS Code's own naming). Not the activity bar's first slot, not the editor center. Closeable. Reopen via command palette. + +```text +┌──┬───────────────────────────┬─ Parallel agents view ──────────┐ +│ │ │ ▶ docs-writer streaming… │ +│A │ Editor (primary) │ tool: read_file │ +│c │ user code, just like │ ▶ test-writer waiting on │ +│t │ VS Code │ tool approval │ +│iv│ │ ▼ security-reviewer done · │ +│it│ │ 3 findings │ +│y │ │ findings.md modified │ +│ │ │ │ +├──┴───────────────────────────┴─────────────────────────────────┤ +│ Status bar ⚡ 2 agents running · $0.41 today · cache: 92% hit │ +└────────────────────────────────────────────────────────────────┘ + ↑ status item is always visible; clicking it focuses the + auxiliary-bar view (right by default, draggable to left). + The status bar sits at the bottom — below both the editor + and the auxiliary bar — per VS Code's workbench layout. +``` + +## Behavior + +- New agent: `Ctrl+K Ctrl+N` (chord) opens a quick-pick of skills from `.zeus/skills/`, runs the chosen one. The earlier draft used `Ctrl+Shift+A`, but that clashes with VS Code's `toggleSearchEditorContextLines` in the Search Editor; using a chord keeps the new shortcut out of every default scope +- Each agent: own subtree in the view with timeline (tool calls, text deltas), final summary, cancel button, "open in chat" button +- Done agents move to "Recent" collapsed group; never auto-dismissed +- A finished agent's file edits are surfaced as a diff PR-style review, not auto-applied +- Notifications: agent completion → optional status bar pulse, no modal + +## What this UI does **not** do + +- It is **not** the editor home page +- It does not auto-open on startup unless the user pinned it +- It does not show a "create a project plan" or "decompose this PRD" prompt +- It does not encourage running 10 agents at once just because you can + +## File contracts + +- Source of truth for runnable skills: `.zeus/skills/*.md` (loaded by `feat/agent-sdk`) +- Source of truth for running agents: `IAgentRuntime` events (from `feat/agent-sdk`) +- Cost / cache state: subscribed to from `feat/prompt-cache-hud` shared store + +## Acceptance criteria (real impl) + +- [ ] Quick-pick of skills picks one and starts it +- [ ] Auxiliary bar shows live tool-call timeline per agent +- [ ] Cancel works mid-stream +- [ ] Done agents persist in the view for the session +- [ ] No auto-open behavior on startup +- [ ] File edits are shown as diff, never applied without user "Apply" +- [ ] Keyboard: `Ctrl+K Ctrl+N` new agent, `Ctrl+K Ctrl+A` focus list — both chords, to avoid VS Code defaults (`Ctrl+Shift+A` is `toggleSearchEditorContextLines`; `Ctrl+Shift+L` is `editor.action.selectHighlights`) + +## Status + +Slot reserved at `src/vs/workbench/contrib/parallelAgents/`. diff --git a/src/vs/workbench/contrib/parallelAgents/README.md b/src/vs/workbench/contrib/parallelAgents/README.md new file mode 100644 index 00000000..bf0d028d --- /dev/null +++ b/src/vs/workbench/contrib/parallelAgents/README.md @@ -0,0 +1,20 @@ +# `parallelAgents` contribution + +Slot for the auxiliary-bar view that surfaces running and completed subagents. Design: [`docs/zeus-parallel-agents-ui.md`](../../../../../docs/zeus-parallel-agents-ui.md). + +The view is deliberately **not** the editor's home surface — Zeus's counter-positioning vs Cursor 3 / Antigravity 2.0 / Windsurf Cascade. + +## Canonical IDs + +The view container, view, and command identifiers are exported from [`common/parallelAgents.ts`](./common/parallelAgents.ts): + +- `PARALLEL_AGENTS_VIEW_CONTAINER_ID = 'zeus.parallelAgents'` +- `PARALLEL_AGENTS_VIEW_ID = 'zeus.parallelAgents.list'` +- `PARALLEL_AGENTS_COMMAND_NEW = 'zeus.parallelAgents.new'` +- `PARALLEL_AGENTS_COMMAND_FOCUS = 'zeus.parallelAgents.focus'` + +Other branches (status-bar HUD, command palette, tests) should import these constants rather than retype the string IDs. Default location: right-hand **auxiliary bar**, `hideIfEmpty: true`. The activity bar's first slot is intentionally not taken; the view is opened via command palette or by clicking the agent count in the status bar. + +## Why no `*.contribution.ts` yet + +Registering a view container with no view body, or with a view that only renders "loading…", ships a broken UI as soon as this PR lands. The real registration is paired with the runtime stream in `feat/agent-sdk` (#26), where the view becomes interactive on day one and consumes the constants in `common/parallelAgents.ts`. diff --git a/src/vs/workbench/contrib/parallelAgents/common/parallelAgents.ts b/src/vs/workbench/contrib/parallelAgents/common/parallelAgents.ts new file mode 100644 index 00000000..95bebe18 --- /dev/null +++ b/src/vs/workbench/contrib/parallelAgents/common/parallelAgents.ts @@ -0,0 +1,18 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +// Stable identifiers for the parallel-agents auxiliary-bar view. Exported +// here (rather than left as strings in the README) so the status-bar item +// in feat/prompt-cache-hud, command-palette entries, and tests can all +// import a single source of truth without duplicating literals. +// +// The real view registration lives in feat/agent-sdk; it consumes these +// constants when wiring up ViewContainerRegistry / ViewsRegistry. + +export const PARALLEL_AGENTS_VIEW_CONTAINER_ID = 'zeus.parallelAgents'; +export const PARALLEL_AGENTS_VIEW_ID = 'zeus.parallelAgents.list'; + +export const PARALLEL_AGENTS_COMMAND_NEW = 'zeus.parallelAgents.new'; +export const PARALLEL_AGENTS_COMMAND_FOCUS = 'zeus.parallelAgents.focus';