Repository navigation
Edit context resolves literal clues and returns matched source - #1332
Merged
Merged
Conversation
A file-scoped match can locate the edit target and retrieve its tests and linked lessons in the same request. Keep source pointers when the matches do not identify one scope. Signed-off-by: Lareb Zafar <[email protected]>
Use verified member spans for code and tests when file clues match several members. Keep full bodies available for a named type and deduplicate lessons by their identity. Signed-off-by: Lareb Zafar <[email protected]>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Signed-off-by: Lareb Zafar <[email protected]>
Signed-off-by: Lareb Zafar <[email protected]>
Signed-off-by: Lareb Zafar <[email protected]>
Signed-off-by: Lareb Zafar <[email protected]>
8 of 9 tasks
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.
Changelog category
Changelog entry
code.edit_contextaccepts literal clues in a known file and returns the matching implementation, indexed tests, and linked lessons in one call.Why
An agent can know the file and the text it needs without knowing the declaration's name. A scoped edit lookup can locate that declaration and gather its evidence together. Matches across a large type return the verified member bodies.
Scope and risk
The lookup uses the existing scoped grep and symbol readers. It filters the candidate scan to the requested file. It verifies retained source at the match revision, including after an incremental index, and returns candidate locations when the evidence is ambiguous or incomplete. Named declarations retain their full source. Lessons for several matched members preserve each link's freshness.
Compatibility, rollout and rollback
cluesinput tocode.edit_context.Tests
Ruff formatting, lint, SDK and reference generation, and
git diff --checkpassed. A private index replay verified exact source, test excerpts, candidate handling, and revision matching on both Tree-sitter and SCIP. The callback replay returned six matching method bodies totaling 6,987 characters and one test excerpt. The replay also verified a body-only reindex, a path with a space beside a matching name prefix, and distinct freshness on links from one lesson. The integration cases cover file scope, ambiguity, and member selection.AI assistance in the code
Checklist