diff --git a/packages/experimental/client-ui-forge/src/client/ChangesTab.module.css b/packages/experimental/client-ui-forge/src/client/ChangesTab.module.css
index 3273865b49..b11b200a18 100644
--- a/packages/experimental/client-ui-forge/src/client/ChangesTab.module.css
+++ b/packages/experimental/client-ui-forge/src/client/ChangesTab.module.css
@@ -318,15 +318,6 @@
white-space: nowrap;
}
-.fileMessage {
- display: flex;
- align-items: center;
- gap: 10px;
- margin: 0;
- padding: 12px 16px;
- color: var(--dsw-alias-label-secondary);
-}
-
/* Lines of one file: one column of grid rows, or two cells per row side by side. */
.code {
overflow-x: auto;
@@ -433,24 +424,31 @@
}
/* Collapsed unchanged lines; the row expands them. */
-.gap {
+/* Collapsed unchanged lines, a collapsed large file, and a file whose lines cannot be drawn share one strip;
+ only the first two open on a click. */
+.gap,
+.fileNote {
display: flex;
align-items: center;
gap: 6px;
box-sizing: border-box;
width: 100%;
min-height: 26px;
+ margin: 0;
padding: 0 12px;
border: 0;
background: var(--forge-fill);
color: var(--dsw-alias-label-tertiary);
- cursor: pointer;
font-family: var(--dsw-font-family);
font-size: 12px;
line-height: 18px;
text-align: left;
}
+.gap {
+ cursor: pointer;
+}
+
.gap:hover:not(:disabled) {
background: var(--dsw-alias-interactive-bg-hover);
color: var(--dsw-alias-label-primary);
diff --git a/packages/experimental/client-ui-forge/src/client/DiffFile.tsx b/packages/experimental/client-ui-forge/src/client/DiffFile.tsx
index cd8c91f6d1..da97729464 100644
--- a/packages/experimental/client-ui-forge/src/client/DiffFile.tsx
+++ b/packages/experimental/client-ui-forge/src/client/DiffFile.tsx
@@ -7,7 +7,7 @@
import { useMemo, useState, type ReactNode } from 'react'
import clsx from 'clsx'
import {
- Button, FileTypeIcon, IconChevronDownOutlineRegular, IconChevronsUpDownOutlineRegular, IconEllipsisOutlineRegular,
+ FileTypeIcon, IconChevronDownOutlineRegular, IconChevronsUpDownOutlineRegular, IconEllipsisOutlineRegular,
languageForPath, Menu, MenuItemButton, PathLabel, useCodeHighlighter, type CodeHighlighter, type HighlightSpan,
} from '@deepseek-ai/dsh-client-ui-primitives'
import type { PropsLocale } from '@deepseek-ai/dsh-client-ui-slots'
@@ -177,15 +177,16 @@ function Lines({ file, text, open, onExpand, split, wrap, t }: Pick
{t('diff.fileTooLarge')}
+ if (file.binary) return{t('diff.binary')}
+ if (file.oversized) return{t('diff.fileTooLarge')}
if (file.hunks.length === 0) return null if (large && !revealed) { + // A large file starts as one collapsed strip, drawn and opened like the collapsed unchanged lines. return ( -