Repository navigation
Recall and learning in the coding agents' model endpoint #22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
dcmcand
wants to merge
12
commits into
main
Choose a base branch
from
feat/memory-mvp-2-proxy
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+2,920
−26
Open
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
f112713
feat(agentproxy): recall memories into agent calls and learn from typ…
dcmcand ca0127f
feat: give the coding agents' model endpoint the person's memory
dcmcand 4532186
fix(agentproxy): a panic while learning is logged, not fatal
dcmcand 4410023
feat(api): list and delete your memories
dcmcand 2106b02
feat(ui): a Memories page under Settings
dcmcand dc63b26
docs: memory recall, learning and the Memories page
dcmcand f9d24dd
fix(agentproxy): log long typed messages skipped from learning, and f…
dcmcand a93c9ce
fix(ui): show memory being off as information, not an error
dcmcand fecd778
feat(api): only a browser session can delete a memory
dcmcand 763d296
docs: memory SSN check, browser-only delete and recall delay
dcmcand 5882449
fix(agentproxy): don't learn an exchange the agent didn't fully receive
dcmcand 6e77c71
Merge pull request #23 from nebari-dev/feat/memory-mvp-3-api-ui
aktech File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| package agentproxy | ||
|
|
||
| // WaitLearning blocks until every learn goroutine p started has finished. | ||
| func WaitLearning(p *Proxy) { p.learning.Wait() } |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A real agent disconnect still gets learned here, with a cut-off answer. The disconnect cancels
r.Context(), the upstream read fails, andcopyEventsreturns a nil error (line 343 ignoressc.Err()), sowerrstays nil. ThebrokenWritertest inlearn_test.go:262fails the write instead, so it doesn't cover this path. Returningsc.Err()fromcopyEventsand also requiringr.Context().Err() == nilbeforestartLearningwould close it.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 5882449, with both changes. The non-streamed path had the same hole: it ignored the
io.ReadAllerror, so a disconnect there learned the typed turn alone. It now carries the read error too.I added five subtests to
TestLearnSkipsFailedAnswerscovering a cancelled context mid-stream, during a non-streamed answer, and at the end of a complete stream, plus an upstream connection drop in each path. I also checked that each part of the fix is needed: droppingsc.Err(), the read error, or the context check each makes its own test fail.