feat: show this reply's Diff on written-file cards - #840
Closed
Kitten9533 wants to merge 1 commit into
Closed
Kitten9533 wants to merge 1 commit into
Kitten9533 wants to merge 1 commit into
Conversation
Kitten9533
force-pushed
the
feat/turn-written-file-diff
branch
from
September 14, 2026 02:16
7cb134d to
6ead281
Compare
Clicking a file card expands this reply's write/edit Diff. A small icon still opens the file. Line counts match the expanded view. Button labels use Diff in English, Simplified Chinese, and Traditional Chinese, without jargon such as "turn" or "本轮".
Kitten9533
force-pushed
the
feat/turn-written-file-diff
branch
from
September 14, 2026 02:19
6ead281 to
e928f4f
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.
Problem
#378 already puts a small file card under the reply for each file the assistant wrote or edited. Clicking it opens the file.
You can jump to the file, but you still cannot see what this reply changed. You have to unfold the
edit/writetool cards, or use Explorer's Git Diff, which shows everything since the last commit, not just this reply.Solution
The file cards stay. Click a card to see this reply's added and removed lines for that file. The small icon on the right still opens the file.
write/editcalls from this reply are listed.+N/-Nnumbers match the expanded view. Path header lines in the patch are not counted.Changes
New:
components/SplitPatchView.tsx— extracted fromMessageViewand reused when a file card is expanded.Edited:
lib/turn-written-files.ts— attach this reply's patch and line countslib/patch.ts— count added/removed lines the same way the expanded view doescomponents/TurnWrittenFiles.tsx— expandable file card, open-file icon,+N/-Ncomponents/MessageView.tsx— use the extracted split viewlib/i18n/messages/{en,zh-CN,zh-TW}.ts— Show / Hide / no Diff labelsNet: 10 files, +646 / −241.
Tests
57/57 pass.
tsc --noEmitand eslint on the touched files are clean.问题
#378 已经在回复下方用文件卡片列出这次真正写入或修改的文件。点卡片会打开文件。
文件能一键打开,但还是看不到这次回复改了什么。只能去翻折叠的
edit/write工具卡,或者看 Explorer 的 Git Diff。后者是相对上一次提交的全部改动,不是这次回复。解决方案
文件卡片还在。点卡片可以看到这次回复对该文件新增和删除了哪些行。右侧小图标仍用来打开文件。
write/edit。+N/-N和展开后看到的增删行一致。patch 里的文件路径行不算进去。测试
相关测试 57/57 通过。
tsc --noEmit与触及文件的 eslint 干净。