From 7ed1c920ccc1e76434b3f71c0a96dfaae4192627 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A8=8B=E5=BA=8F=E5=91=98=E9=98=BF=E6=B1=9F=28Relakkes?= =?UTF-8?q?=29?= Date: Mon, 6 Apr 2026 21:31:40 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20compact=20diff=20viewer=20=E2=80=94=20ti?= =?UTF-8?q?ghter=20rows,=20gutter=20indicators,=20softer=20borders?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.6 (1M context) --- desktop/src/components/chat/DiffViewer.tsx | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/desktop/src/components/chat/DiffViewer.tsx b/desktop/src/components/chat/DiffViewer.tsx index ec1e5ffb..2e6e36bb 100644 --- a/desktop/src/components/chat/DiffViewer.tsx +++ b/desktop/src/components/chat/DiffViewer.tsx @@ -25,8 +25,8 @@ export function DiffViewer({ filePath, oldString, newString }: Props) { const deletions = lines.filter((line) => line.type === 'removed').length return ( -
-
+
+
{filePath} @@ -49,10 +49,10 @@ export function DiffViewer({ filePath, oldString, newString }: Props) { {lines.map((line, index) => { const rowClass = line.type === 'added' - ? 'bg-[#f0fff4]' + ? 'bg-[#dafbe1]/60 border-l-2 border-l-[#1a7f37]' : line.type === 'removed' - ? 'bg-[#fff8f8]' - : 'bg-white' + ? 'bg-[#ffebe9]/60 border-l-2 border-l-[#cf222e]' + : 'bg-white border-l-2 border-l-transparent' const prefix = line.type === 'added' ? '+' : line.type === 'removed' ? '-' : ' ' const prefixColor = line.type === 'added' @@ -64,16 +64,16 @@ export function DiffViewer({ filePath, oldString, newString }: Props) { return (
- + {line.oldLineNo ?? ''} - + {line.newLineNo ?? ''} - {prefix} - {line.content} + {prefix} + {line.content}
) })}