Allow chat corrections to update notes#5780
Merged
Merged
Conversation
a37e581 to
59f4d7f
Compare
84af0c0 to
3297e0c
Compare
3297e0c to
ce57004
Compare
✅ Deploy Preview for old-char canceled.
|
ce57004 to
c22d50b
Compare
c22d50b to
c7f5bef
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit c7f5bef. Configure here.
Adds an exact correction chat tool that can update session summaries and transcripts, wires it into chat guidance, and covers replacement behavior with focused tests.
c7f5bef to
0cd678a
Compare
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.

Adds an exact correction chat tool that can update session summaries and transcripts, wires it into chat guidance, and covers replacement behavior with focused tests.
This is part 2 of 2 in a stack made with GitButler:
Note
Medium Risk
The tool writes directly to Tinybase
enhanced_notesandtranscriptswithout undo; incorrectoldTextor model misuse could corrupt user note content, though matching is exact and guards limit partial transcript updates.Overview
Adds a new
apply_session_correctionchat tool so the assistant can persist user corrections (e.g. “it’s not X but Y”) into local session data instead of only replying in chat.The tool performs exact
oldText→newTextreplacements on enhanced note summaries (markdown round-tripped through the editor JSON) and/or transcripts (wordstoken spans plusmemo_md), scoped by session and optionalenhancedNoteId, with default targetsummary_and_transcript. Transcript updates require words and memo to both match when both exist; blank replacements are rejected; invalid summary IDs error for summary-only targets but transcript edits can still apply on the default combined target.It is registered in the chat tool registry with typed I/O, and
FILE_CONTEXT_TOOL_GUIDANCEnow instructs the model to call this tool (andread_current_notewhen needed) for correction phrasing. Behavior is covered by a newsession-correction.test.tssuite.Reviewed by Cursor Bugbot for commit 0cd678a. Bugbot is set up for automated code reviews on this repo. Configure here.