feat(agy-status): handle the agy activity status in the sessions tab#80
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Shows Antigravity (agy) busy/idle in the Sessions tab — the agy analog of Claude's per-pid sidecar status. agy has no sidecar, so its live session state is read from the running CLI's local loopback RPC (
GetAllCascadeTrajectories) and matched to the session by workspace/cwd. Along the way it generalizes the per-session live-state fields so Claude and agy flow through one path, and factors a shared loopback-RPC client.Changes
Agy session status (
panel/AntigravityLocalServer.swift,SessionStore.swift)AntigravityLocalServer— shared client for the running agy's local Connect-RPC (the Codeium/Windsurf "Cascade" language server;lsofloopback port → HTTP POST, no auth/CSRF, 127.0.0.1 only).liveStatusByWorkspace()callsGetAllCascadeTrajectories, mapsCASCADE_RUN_STATUS_{BUSY,RUNNING,CANCELING}→ busy /IDLE→ idle, keyed by workspace path (latest trajectory per workspace).SessionStore.enrichAntigravity— during the 3s poll, when an agy session is present, fetch the workspace statuses and match each agy session by cwd (exact or prefix) → set its live status + last-activity. One RPC per scan, only when agy is running.Generalized live-state fields (
SessionStore,Sessions,CompactView,Panel)Session.claudeStatus/claudeName/claudeUpdatedAt→liveStatus/liveTitle/lastActivityAt(agent-agnostic; Claude's sidecar and agy's RPC feed the one path).claudeSessionIDunchanged (it's the transcript/event key).Refactor (
AntigravityUsage.swift)AntigravityUsageProbenow uses the sharedAntigravityLocalServer.call(...)forGetUserStatus, dropping ~64 lines of duplicated port-discovery + HTTP plumbing.build.sh— new file added to the swiftc source list.Testing
swift build→ clean;./build.sh→ app builds.liveStatusByWorkspace()validated against the live agy 1.0.6 RPC:/Users/stubehan/stackone→idle, correct last-activity time (matches rawGetAllCascadeTrajectories).Related issues
agy local-RPC surface per steipete/CodexBar#1178. Builds on the usage panel (#78) — the shared client is introduced here and the usage probe refactored onto it.