Context Engine. 现已支持完整提交历史
Modern AI coding agents are great at reading the files you give them. They stumble, however, when the answer is buried in months of commit history.
现代 AI 编码代理在读取你提供的文件时表现优异,但当答案埋藏在数月的提交历史中时,它们就会陷入困境。
Without that lineage, agents often struggle to parse well-established norms:
没有这种谱系,代理往往难以解析已确立的规范:
Joel, one of the engineers behind the feature, summed it up perfectly:
Joel,这位功能的工程师之一,总结得非常到位:
“Often when the agent is trying to do something, something similar has been done before. We want to learn from that thing that was done before and adapt it to a new situation.”
“当代理尝试做某件事时,往往以前已经做过类似的事。我们希望从以前的做法中学习,并将其适配到新场景。”
By piping commit history directly into the context engine, Context Lineage closes this historical gap.
通过将提交历史直接输入上下文引擎,Context Lineage 弥合了这一历史鸿沟。
Why it matters:
为什么重要:
What is Context Lineage
什么是 Context Lineage
Context Lineage is an upgrade to the Augment Context Engine that:
Context Lineage 是对 Augment Context Engine 的升级,它:
The result is a context window that spans not just the current codebase but its evolution.
最终得到的上下文窗口不仅涵盖当前代码库,还涵盖其演进过程。
How it works under the hood
底层工作原理
1. Commit harvesting inside the IDE
1. 在 IDE 内收集提交
The Augment extension now scans git history alongside workspace files. New commits are detected in near real time and streamed to the backend.
Augment 扩展现在会扫描 git 历史记录以及工作区文件。新提交几乎实时检测并流式传输到后端。
2. Lightweight summarization with Gemini
2. 使用 Gemini 进行轻量级摘要
Raw diffs can be huge. Instead of embedding thousands of lines, we ask Gemini 2.0 Flash to condense each commit into a few sentences with:
原始 diff 可能非常庞大。为了避免嵌入成千上万行内容,我们让 Gemini 2.0 Flash 将每次提交压缩成几句话,并附带:
This summary, plus metadata, becomes the search document.
这段摘要加上元数据,就成了可搜索的文档。
3. Indexing and retrieval
3. 索引与检索
Summaries are chunked and embedded alongside normal file chunks. At query time, the agent can use the retrieval tool to find these historical commits.
摘要以分块形式嵌入,与常规文件分块并存。查询时,代理可以使用检索工具找到这些历史提交。
If matching commits exist, their summaries and metadata are injected into the agent prompt, providing it with historical insigh...