feat: add Antigravity agent support#1
Merged
Conversation
- Add AgentKind enum (Codex/Antigravity) with per-agent paths, process detection, and CDP target matching - Update agent.rs to accept AgentKind for all functions (launch, kill, port detection) - Update cdp.rs find_main_target to dispatch on agent kind (Codex: app://-/index.html, Antigravity: https://127.0.0.1:*/ with title Antigravity) - Add generate_antigravity_injection_script targeting #root, .bg-sidebar, .bg-background, and Antigravity CSS vars - Add set_selected_agent and set_auto_launch Tauri commands - Add agent selector UI (Codex/Antigravity toggle buttons) in frontend status bar - Agent switching auto-applies the current theme to the new agent
1. Move status bar HTML back inside <header> before </html> - was placed after </html> causing all getElementById to return null 2. Reset cdp_port and active_identifier when switching agents - set_selected_agent now takes State<AppState> and clears stale port
HTML had btn-close but CSS defines .close-btn
Owner
Author
|
All review findings have been addressed:
|
Only show '已切换到' success notification when theme auto-apply is not attempted, so applyTheme error notifications are preserved.
Owner
Author
|
Fixed in commit 5429b66: the success notification now only shows when auto-apply is not attempted, so applyTheme error notifications are no longer overwritten. |
set_selected_agent now also clears config.active_identifier so that clear_theme on the new agent won't pass stale identifiers to CDP.
Owner
Author
|
Fixed in commit a171b0a: |
…ontend build - cargo fmt --check: enforce consistent formatting - cargo clippy -D warnings: catch common Rust issues - cargo check: verify compilation - frontend esbuild bundle: verify JS builds Also fix clippy warnings (derive Default, for_kv_map) and run cargo fmt.
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
Adds support for Antigravity agent alongside the existing Codex agent.
Backend Changes
Frontend Changes
Antigravity DOM Structure (observed via CDP)
[role="navigation"][aria-label="Sidebar"]with.bg-sidebar--foreground,--background,--sidebar