Add agent status to Home view#5128
Conversation
🤖 Augment PR SummarySummary: Adds real-time AI agent session/status tracking to the Home view, starting with Claude Code. Changes:
Technical Notes: Agent discovery uses per-window tmpdir JSON files to query sibling windows for session state, and the Home view computes an attention badge when sessions are waiting on user input. 🤖 Was this summary useful? React with 👍 or 👎 |
286f732 to
7a38088
Compare
|
augment review |
7a38088 to
a6aa928
Compare
|
Still some questions on the exact UI/UX, and I still need to test Windows/macOS Window focusing (or we can just remove that if we feel it's not useful), but it's probably better to get the core merged sooner rather than later so we can iterate on it. |
a6aa928 to
1c5d295
Compare
| Logger.debug(`AgentIpcServer listening on ${this._server.ipcAddress}`); | ||
| } catch (ex) { | ||
| Logger.error(ex, 'AgentIpcServer.start'); | ||
| this._server = undefined; |
There was a problem hiding this comment.
Should you do a this._server?.dispose() first here?
| async start(options: AgentIpcServerOptions): Promise<void> { | ||
| if (this._server != null) return; | ||
|
|
||
| this._workspacePaths = options.workspacePaths; |
There was a problem hiding this comment.
Since this is only set on start, what happens if I add or remove a folder to the workspace? Do we need to listen to onDidChangeWorkspaceFolders?
| export function getAgentSessionProviders(container: Container): AgentSessionProvider[] { | ||
| return [ | ||
| new ClaudeCodeProvider({ | ||
| sendTelemetryEvent: (name, props) => container.telemetry.sendEvent(name as any, props as any), |
There was a problem hiding this comment.
Is there a way around the "as any" casts here and in onGateDeadlock?
| ); | ||
| } | ||
|
|
||
| switch (event.event) { |
There was a problem hiding this comment.
We will probably want to explicitly add no-op cases for TeammateIdle, TaskCompleted, InstructionsLoaded, ConfigChange, WorktreeCreate, WorktreeRemove, etc. if we aren't handling them yet or intentionally skipping them, just so it doesn't look like we missed them.
There was a problem hiding this comment.
Would this still be "Cli Integration IPC server" or is it more generic now?
954275c to
895f524
Compare
|
@ramin-t addressed feedback, also push up a commit simplifying some aspects since it's gone through a few iterations now. |
🟢 Conflict resolved with 100% confidenceComment Resolution details🟢
|
GK CLI's default `gk ai hook install claude-code` registers every event as non-blocking, so Claude Code fires PermissionRequest and proceeds before GitLens can intercept the prompt. Pass explicit `--event`/`--blocking-event` flags so PermissionRequest is installed with `--blocking` and GitLens can surface allow/deny UI in the home webview.
Mirrors the install command: delegates to `gk ai hook uninstall claude-code`, which removes GitLens-owned hook entries from `~/.claude/settings.json` while leaving entries owned by other tools untouched.
13e4564 to
049e2fd
Compare


Summary
Adds real-time AI agent status tracking to the Home view, starting with Claude Code as the first provider.
AgentStatusService,AgentStatusProvider) with a Claude Code implementation that discovers running sessions via process inspection and IPCagent-status,agent-session-card,agent-status-pill) to display active agent sessions, their current state, and token usageCloses #5041
Test plan
pnpm run build— no new errors