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:
@@ -18,15 +18,13 @@ import { useLayoutEffect, useMemo, useRef } from 'react'
|
||||
import { createElement, type ReactNode } from 'react'
|
||||
import DOMPurify from 'dompurify'
|
||||
import { MarkdownText } from '@deepseek-ai/dsh-client-ui-primitives'
|
||||
import type { ComponentType } from 'react'
|
||||
import { markdownTextProps } from './markdown-labels.tsx'
|
||||
import { lazyChunkComponent } from './lazy-chunk.tsx'
|
||||
import { resolveLocalMediaDest } from './markdown-images.ts'
|
||||
import {
|
||||
analyzeHtmlSegment,
|
||||
type AnalyzedMarkdownHtml,
|
||||
} from './markdown-html.ts'
|
||||
import { splitMermaidBlocks, type MermaidMarkdownProps } from './mermaid-blocks.ts'
|
||||
import { splitMermaidBlocks } from './mermaid-blocks.ts'
|
||||
import type { SessionScope } from './api.ts'
|
||||
import css from './sidebar.module.css'
|
||||
|
||||
|
||||
@@ -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) } : {}),
|
||||
|
||||
Reference in New Issue
Block a user