fix(changes): resolve merge lint errors from origin/main sync

- DiffPane.tsx: gate the redacted view on the computed `hit` (the unused-var
  lint was the memo returning redactionHit: true unconditionally; now an
  unredacted payload short-circuits like the toggle-off path, and only an
  actual secret hit builds the masked copy)
- MarkdownHtml.tsx: drop the three dead imports (ComponentType,
  lazyChunkComponent, MermaidMarkdownProps) left by the mermaid-lazy merge

Typecheck clean; eslint clean on both files; 39 targeted tests pass.
This commit is contained in:
lhh010
2026-09-04 14:25:33 +08:00
parent 16d8df2e93
commit 7f9a040065
2 changed files with 2 additions and 3 deletions
+1
View File
@@ -177,6 +177,7 @@ export function DiffPane({ target, scope, height, onHeightCommit, onClose, onExp
const mask = (text: string): string => redactText(path, text).text
const hit = [opRaw.read, opRaw.content, opRaw.edit?.oldString, opRaw.edit?.newString, opRaw.errorText, priorRaw]
.some((text) => text !== undefined && redactText(path, text).hit)
if (!hit) return { op: opRaw, prior: priorRaw, redactionHit: false }
const redacted: FileOp = {
...opRaw,
...(opRaw.read !== undefined ? { read: mask(opRaw.read) } : {}),