Skip to content

feat(agents): add Antigravity and OpenCode collectors, context launcher, and strict window class focusing - #8806

Closed
anmolsharma152 wants to merge 1 commit into
omacom:quattrofrom
anmolsharma152:feat/agents-antigravity-opencode-collectors
Closed

anmolsharma152 wants to merge 1 commit into
omacom:quattrofrom
anmolsharma152:feat/agents-antigravity-opencode-collectors

Conversation

@anmolsharma152

@anmolsharma152 anmolsharma152 commented Aug 28, 2026 •

Copy link
Copy Markdown

Summary of Changes

  1. Strict Window Class Matching (bin/omarchy-launch-or-focus):

    • Updates window resolution to match strictly against window .class rather than .title.
    • Prevents open browser tabs (e.g. GitHub PRs or documentation pages containing app names) from intercepting desktop app focus shortcuts.
  2. Context-Aware Terminal Agent Launcher (bin/omarchy-launch-agent):

    • Detects the active terminal working directory (omarchy-cmd-terminal-cwd) when launching TUI coding agents (agy, codex, opencode).
    • Gracefully falls back to ~/Work (or ~/Projects) when triggered outside an active terminal window, ensuring autonomous coding agents start safely in designated project directories rather than $HOME.
  3. Antigravity Usage Collector (bin/omarchy-agent-usage-antigravity):

    • Scrapes Google AI / Antigravity transcript logs in ~/.gemini/antigravity/brain/ for token counts and model breakdown (Gemini 3.7 Flash High, Gemini 3.7 Pro).
    • Reports 5h session and weekly rolling limit telemetry with local timezone midnight rollover for active Google AI Pro plans.
  4. OpenCode Usage Collector (bin/omarchy-agent-usage-opencode):

    • Queries local SQLite session logs in ~/.local/share/opencode/opencode.db to calculate token consumption and session breakdown.
  5. Pure Vector Provider Marks (shell/plugins/agents/assets/):

    • Bundles lightweight, scalable vector marks for Antigravity and OpenCode matching upstream's pure SVG architecture for dark and light surfaces.
  6. Unit Test Suite (test/shell.d/agent-usage-collectors-test.sh):

    • Dedicated unit tests mocking transcript logs and SQLite tables asserting schema contract compliance and token accumulation.

Verification

  • Verified all test suites pass with 0 errors:
    • bash test/shell.d/agent-usage-collectors-test.sh
    • bash test/shell.d/agent-usage-update-test.sh
    • bash test/shell.d/agents-panel-test.sh
    • bash test/shell.d/default-agent-test.sh
  • Tested on live Hyprland desktop across active terminal and empty workspace contexts.

Copilot AI balanced review requested due to automatic review settings August 28, 2026 18:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds agent usage collectors, context-aware launching, stricter window focusing, and provider artwork support.

Changes:

  • Adds Antigravity and OpenCode usage collectors.
  • Introduces terminal-directory-aware agent launching and strict class matching.
  • Adds PNG/SVG provider mark resolution and assets.

Tip

If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.

Reviewed changes

Copilot reviewed 2 out of 13 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
bin/omarchy-agent-usage-antigravity Collects Antigravity transcript usage and limits.
bin/omarchy-agent-usage-opencode Collects OpenCode database usage and limits.
bin/omarchy-launch-agent Adds context-aware agent launching.
bin/omarchy-launch-or-focus Restricts matching to window classes.
shell/plugins/agents/Panel.qml Adds PNG icon candidates.
shell/plugins/agents/assets/antigravity.svg Adds dark-theme Antigravity mark.
shell/plugins/agents/assets/antigravity-light.svg Adds light-theme Antigravity mark.
shell/plugins/agents/assets/antigravity.png Adds raster Antigravity mark.
shell/plugins/agents/assets/antigravity-light.png Adds light raster Antigravity mark.
shell/plugins/agents/assets/opencode.svg Adds dark-theme OpenCode mark.
shell/plugins/agents/assets/opencode-light.svg Adds light-theme OpenCode mark.
shell/plugins/agents/assets/opencode.png Adds raster OpenCode mark.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread shell/plugins/agents/Panel.qml Outdated
var candidates = []
if (colorLuminance(surfaceColor || Color.background) >= 0.5)
if (colorLuminance(surfaceColor || Color.background) >= 0.5) {
candidates.push(Qt.resolvedUrl("assets/" + p.providerId + "-light.png"))
@anmolsharma152

Copy link
Copy Markdown
Author

Addressed in commit 68fd4ec: added the missing shell/plugins/agents/assets/opencode-light.png asset to ensure complete coverage for light surface candidate resolution.

@anmolsharma152
anmolsharma152 force-pushed the feat/agents-antigravity-opencode-collectors branch from 1400959 to 795d551 Compare August 28, 2026 19:34
@anmolsharma152 anmolsharma152 changed the title feat(agents): add Antigravity and OpenCode collectors, PNG mark support, and strict window class focusing feat(agents): add Antigravity and OpenCode collectors, context launcher, and strict window class focusing Aug 28, 2026
@anmolsharma152
anmolsharma152 force-pushed the feat/agents-antigravity-opencode-collectors branch 5 times, most recently from 65902bb to 927cf8a Compare August 28, 2026 20:10
@anmolsharma152
anmolsharma152 force-pushed the feat/agents-antigravity-opencode-collectors branch from 927cf8a to 46541f4 Compare August 28, 2026 20:13
@anmolsharma152

Copy link
Copy Markdown
Author

Closing in favor of a clean, consolidated submission.

@anmolsharma152
anmolsharma152 deleted the feat/agents-antigravity-opencode-collectors branch August 29, 2026 05:30
@anmolsharma152

Copy link
Copy Markdown
Author

Superseded by #8873 with clean single-commit history and unified vector marks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants