fix(vscode): restore fresh prompt history recall - #12122
Closed
dengbushi wants to merge 1 commit into
Closed
Conversation
dengbushi
force-pushed
the
fix/vscode-prompt-history-11945
branch
from
July 11, 2026 06:55
7eaedaf to
62a89f2
Compare
dengbushi
marked this pull request as ready for review
July 11, 2026 06:55
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (3 files)
Previous Review Summary (commit 62a89f2)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit 62a89f2)Status: No Issues Found | Recommendation: Merge Files Reviewed (3 files)
Reviewed by gpt-5.6-sol-20260709 · Input: 56.4K · Output: 5.8K · Cached: 358.6K Review guidance: REVIEW.md from base branch |
dengbushi
force-pushed
the
fix/vscode-prompt-history-11945
branch
from
July 11, 2026 11:22
62a89f2 to
d13b75d
Compare
Contributor
Author
|
Closing this PR because it has been superseded by #12201, which merged the same root-cause fix: record |
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.
Fixes #11945
What changed
Restore the newest prompt to keyboard history when it is the first message in a new chat.
Root cause
This regressed in
fbe5f4cbfrom #11442. During the first send,session.sendMessage()synchronously changes the draft key from:newto:pending:<uuid>.PromptInputchecked that key before appending the sent draft to history, so the guard returned early and skipped the append.The fix moves only
history.append(draft)before that changed-key guard. Dispatch still happens first, and the guard continues to protect the later UI cleanup/reset from stale state.Validation
Local limitations
The full VS Code unit suite reproducibly had 39 failures in this Windows environment outside the touched tests (symlink, POSIX-path, and shell-environment assumptions); no clean-main baseline was run, so they are not claimed as pre-existing. A local development extension launch was also not completed because the Windows CLI build path was unavailable, so manual ArrowUp verification is not claimed.