Conversation
Antigravity IDE is a separate tool from the Antigravity CLI (and the desktop app): it writes full plaintext transcripts under ~/.gemini/antigravity-ide/brain/<id>/.system_generated/logs/transcript.jsonl, while the CLI keeps only an encrypted body plus a summaries DB. Read the IDE transcripts from a dedicated adapter, mirroring the Cursor CLI/IDE split: two adapters, one shared AgentId::Antigravity, two roster instances. The existing CLI adapter is left untouched. Parses user requests, thinking, tool calls and outputs, and checkpoints. User-uploaded images live under the session's .user_uploaded/ and are re-attached to the nearest user turn by the media filename timestamp (28/36 within 60s on real data).
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.
声明
本 PR 由 AI 编码 Agent (agy-ide, Gemini 3.8 Flash & Pi, DeepSeek V4.1 Flash) 在 @iroha3 的协作与审阅下完成。
背景与问题
目前 Wake 对 Antigravity 的集成仅实现了对 CLI 摘要数据库的读取,缺失了对 IDE 环境完整会话日志的解析:
~/.gemini/antigravity-cli/conversation_summaries.db~/.gemini/antigravity-ide/brain/*/.system_generated/logs/transcript.jsonl缺少对 IDE 会话记录的解析,导致仅在 IDE 环境中使用 Antigravity 的用户无法在 Wake 中检索和查看完整的会话历史(包括消息正文、思考过程、工具调用和检查点等)。
本 PR 旨在补全对 Antigravity IDE 数据源的支持。(注:桌面端路径
~/.gemini/antigravity/本次修改暂不覆盖。)变更说明
1. 新增 Adapter
adapters/antigravity_ide.rs与AgentId::AntigravityIdeAgentId::AntigravityIde(命名为 "Antigravity IDE"),与 CLI 版本("Antigravity CLI")区分,以明确指示当前未覆盖桌面端。CLI Adapter 保持不动(代码无变动)。USER_INPUT→ 用户消息(解析<USER_REQUEST>正文)PLANNER_RESPONSE→ 助手消息(提取thinking与tool_calls)RUN_COMMAND→ 工具输出CHECKPOINT→CompactSummaryUSER_SETTINGS_CHANGE,项目路径结合Active Document与工具cwd并由~/.gemini/projects.json归一化。2. 支持文件形式的图片附件解析
<session>/.user_uploaded/media_<ms>.<ext>。text_offset = text.len()。仅在启用decode_images时触发。3. Roster 与配置契约更新
AgentId::ALL数量为 22,调整DEFAULT_INSTANCES计数。Open In命令(agy --conversation=<id>)及 Insights 配色,图标复用antigravity.png。4. 文档同步
README.md与PRODUCT.md中更新 Antigravity CLI 与 IDE 的分项说明。验证情况
tests/fixtures/antigravity/brain/ag-ide-0001/,并通过antigravity_ide_parse_contract验证角色映射、标题提取、项目识别、思考过程提取、工具调用解析及图片挂载契约。cargo fmt --all --checkcargo test -p wake-corecargo test -p wakecargo build --workspace已知边界
~/.gemini/antigravity/brain/格式与 IDE 类似,但本次改动明确界定在 IDE Adapter,桌面端支持可后续另开 PR 处理。data_roots指向brain/目录,可直接复用现有文件监听机制实时捕获新会话。设计权衡探讨
我们在此处选择了两个独立的
AgentId(Antigravity对应 CLI,AntigravityIde对应 IDE),而非像 Cursor 那样多源共用同一个AgentId。主要考虑在于:目前桌面端的日志格式虽相同但未做覆盖,使用独立的 Agent ID 能更加准确地向用户传达当前支持的范围。如果我们希望保持全局 Agent ID 命名的简洁性、向 Cursor 的多源模式对齐,我们也可以将其调整为共用
AgentId::Antigravity的实现。