Conversation
This branch has not been deployed
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.
What
Adds a Last turn source to the TUI diff viewer, backed by the
session.diffroute from #47821. It shows the files changed since the last prompt (everything between idle markers), alongside the existing All / Committed / Uncommitted VCS sources.How
packages/tui/src/config/index.tsx:diffs.sourceacceptsturn(newDiffSourceunion overVcs.Mode).packages/tui/src/feature-plugins/system/diff-viewer.tsx: the source picker offers Last turn only when the viewer was opened from a session. Selecting it callsclient.session.diff({ sessionID, context: 12 })and feeds the result through the samenormalizeDiffspath, so empty results and errors reuse the existing states. Turn skips base resolution (needsBase). A remembered or configuredturnsource outside a session falls back tobranch.services/www/src/docs/content/cli/config.mdxlists the new value.Tests
packages/tui:test/cli/tui/diff-viewer.test.tsxgains three cases (session.diff request shape, empty/error states, option absent and fallback outside a session);test/config-v2.test.tsxaccepts the new value. 113 pass.bun typecheckand prettier clean.Not live-tested against a model; verified via tests only.