Skip to content

feat: add Antigravity agent support#1

Merged
Cmochance merged 8 commits into
mainfrom
codex/add-antigravity-support
May 27, 2026
Merged

feat: add Antigravity agent support#1
Cmochance merged 8 commits into
mainfrom
codex/add-antigravity-support

Conversation

@Cmochance
Copy link
Copy Markdown
Owner

@Cmochance Cmochance commented May 27, 2026

Summary

Adds support for Antigravity agent alongside the existing Codex agent.

Backend Changes

  • ****: Added enum (/) with per-agent data directory, binary path, process detection patterns, and pkill patterns. now includes field.
  • ****: All functions now accept parameter for launch, kill, port detection.
  • ****: dispatches on agent kind — Codex matches , Antigravity matches with title Antigravity.
  • ****: New targets Antigravity DOM (, , , CSS vars //).
  • ****: New and Tauri commands.

Frontend Changes

  • Agent selector toggle buttons (Codex / Antigravity) in the status bar
  • Switching agents auto-applies the current theme to the new agent

Antigravity DOM Structure (observed via CDP)

  • with flex layout
  • Sidebar: [role="navigation"][aria-label="Sidebar"] with .bg-sidebar
  • CSS variables: --foreground, --background, --sidebar

Open in Devin Review

- 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
devin-ai-integration[bot]

This comment was marked as resolved.

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
devin-ai-integration[bot]

This comment was marked as resolved.

@Cmochance
Copy link
Copy Markdown
Owner Author

All review findings have been addressed:

  1. Status bar HTML after </html> (commit e1d767e) — Moved back inside <header> before </html>.
  2. Stale CDP port on agent switch (commit e1d767e) — set_selected_agent now accepts State<AppState> and resets both cdp_port and active_identifier to None.
  3. drop-zone-one ID mismatch (commit 9aa416d) — Reverted to drop-zone to match JS getElementById.
  4. btn-close CSS class mismatch (commit 503a5fb) — Reverted to close-btn to match CSS styles.

devin-ai-integration[bot]

This comment was marked as resolved.

Only show '已切换到' success notification when theme auto-apply
is not attempted, so applyTheme error notifications are preserved.
@Cmochance
Copy link
Copy Markdown
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.

devin-ai-integration[bot]

This comment was marked as resolved.

set_selected_agent now also clears config.active_identifier so that
clear_theme on the new agent won't pass stale identifiers to CDP.
@Cmochance
Copy link
Copy Markdown
Owner Author

Fixed in commit a171b0a: set_selected_agent now also clears config.active_identifier in the persisted config, preventing stale identifiers from being passed to CDP on the new agent.

Cmochance added 2 commits May 28, 2026 00:22
…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.
@Cmochance Cmochance merged commit 97f73f3 into main May 27, 2026
3 checks passed
@Cmochance Cmochance deleted the codex/add-antigravity-support branch May 27, 2026 16:38
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.

1 participant