Repository navigation
Attach readable code-linked lessons to exact grep answers - #1128
Merged
Merged
Conversation
Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Signed-off-by: Lareb Zafar <lareb.zafar@clickhouse.com>
4 of 5 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 (leave one):
Changelog entry (one or two sentences a user of Loom can read without the diff; the release pull request collects these into the release notes):
Exact code grep answers can include readable memories linked to their matched files. Lesson reads respect the request deadline and can be disabled with
include_lessons=false.Why
An agent can inspect a function through exact grep and never make a second memory call. Grep did not participate in the existing code-result lesson enrichment, so those reads could not return the project knowledge attached to their files.
Use the same enrichment wrapper as other code answers. It reads lessons after match retrieval, so cached match data does not contain a caller's memories. Only files in the returned answer are candidates; uncovered paths and namespace presence queries read no lessons.
Scope and risk
Adds the shared optional lesson input and output fields to
code.grep, registers its file selector and bounds enrichment by the remaining grep deadline. Existing namespace authorization, narrowed-token refusal, lesson token limits and read timeout remain in the shared helper. No SQL, memory writes, extractor changes or re-indexing.Compatibility, rollout and rollback
code.grepacceptsinclude_lessons(default true) andlesson_namespaces(default empty). Both use the existing hidden-input policy. Responses can includelessonsandlessons_left_out; empty fields are omitted.Tests
make format,make lintandmake typecheckpass; generated SDKs and references are current.AI assistance in the code (leave one; writing this description with AI is fine):
AI-generated: Codex implemented the change and checked the existing authorization, cache and deadline paths. An independent agent reviews the final head.
I can explain every line of this diff and how it interacts with the rest of Loom.
Checklist