Repository navigation
Coding grep excerpts offer an edit-context lookup - #1507
Merged
Merged
Conversation
A known declaration location can return retained code and test examples in one lookup. Paths outside the edit-context location grammar keep the exact range suggestion. Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 6edef4b. Configure here.
Use the resolved tool catalog and keep exact ranges when the named batch would change the source coverage. Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
An indexed grep span can survive a missing symbol row. Offer the exact source read with the same lesson options. Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
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
Coding grep results with short excerpts of Python function declarations can suggest one edit-context lookup for the matching definitions and relevant tests.
Why
A coding caller that requests brief grep context often needs the surrounding implementations before editing. Edit context reads named source and test examples together. The grep description directs editing calls to the default enclosing bodies.
Scope and risk
The suggestion uses the same source locations and scope as the grep result. It checks the matched Python function name against the indexed scope and validates the complete named batch. Each eligible response also supplies the exact ranges to read when a symbol is missing. Both suggestions honor the caller’s lesson options and the resolved tool catalog.
Compatibility, rollout and rollback
nextand the optional native context call inedit_context_next.Tests
make format-check lint typecheckpassed. Added cases for inherited and combined tool catalogs, Python declaration lines, decorators, complete batches, lesson options and the advertised defaults.AI assistance in the code
Checklist
Note
Low Risk
Additive MCP response fields with strict eligibility checks; no auth or persistence changes.
Overview
Extends lean
code.grepexcerpts (include_body: false) so coding toolsets can suggest a follow-upedit_context_nextstep (nativeloom_code_edit_contextwithpath:linenames) when every unmatched hit is a validated Pythondef/async defdeclaration on its scope span, the batch fitsEDIT_CONTEXT_MAX_NAMES, and that tool is listed for the toolset. The existingnextloom_code_readbatch is unchanged and still carries org/namespace plus lesson options.lean_codenow takes afollowupsset;lean_resultspopulates it fromloom_code_readandloom_code_edit_contextintersected with the resolved MCP catalog. Non-declaration hits (e.g. decorators), oversized batches, or toolsets without edit context keep read-only suggestions.MCP
code.grepdescriptions are reworded to emphasize default bodies for edits and excerpts viainclude_body: false.Reviewed by Cursor Bugbot for commit 65f11fc. Bugbot is set up for automated code reviews on this repo. Configure here.