From 4f0c06b8c3ecb7f13267dc31e4b9924d15194d32 Mon Sep 17 00:00:00 2001 From: cruldra Date: Mon, 31 Aug 2026 22:12:24 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(vscode):=20=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E6=A0=91=E5=B8=AE=E5=8A=A9=E6=A8=A1=E5=9D=97=E6=94=B9?= =?UTF-8?q?=E5=90=8D=EF=BC=8C=E6=B6=88=E9=99=A4=E4=B8=8E=20FileTree=20?= =?UTF-8?q?=E7=BB=84=E4=BB=B6=E4=BB=85=E5=A4=A7=E5=B0=8F=E5=86=99=E4=B8=8D?= =?UTF-8?q?=E5=90=8C=E7=9A=84=E5=86=B2=E7=AA=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit macOS 文件系统不区分大小写,`./prFiles/FileTree` 会先命中 fileTree.ts, 导致 webview 类型检查失败、无法打包。 Claude-Session: https://claude.ai/code/session_01HTMgwaE3woqM5yvsHiuSAa --- vscode/webview-ui/src/components/PrFilesPanel.tsx | 2 +- vscode/webview-ui/src/components/prFiles/FileDiffPane.tsx | 2 +- vscode/webview-ui/src/components/prFiles/FileTree.tsx | 4 ++-- .../src/components/prFiles/{fileTree.ts => fileTreeModel.ts} | 0 4 files changed, 4 insertions(+), 4 deletions(-) rename vscode/webview-ui/src/components/prFiles/{fileTree.ts => fileTreeModel.ts} (100%) diff --git a/vscode/webview-ui/src/components/PrFilesPanel.tsx b/vscode/webview-ui/src/components/PrFilesPanel.tsx index 616dacf..ea2ce15 100644 --- a/vscode/webview-ui/src/components/PrFilesPanel.tsx +++ b/vscode/webview-ui/src/components/PrFilesPanel.tsx @@ -17,7 +17,7 @@ import { usePrFiles } from '../hooks/usePrFiles' import { onMessage, postMessage } from '../lib/vscode' import { FileDiffPane } from './prFiles/FileDiffPane' import { FileTree } from './prFiles/FileTree' -import { buildDirTree, flattenTree, isIgnoredPath } from './prFiles/fileTree' +import { buildDirTree, flattenTree, isIgnoredPath } from './prFiles/fileTreeModel' interface PrFilesPanelProps { issue: Issue | null diff --git a/vscode/webview-ui/src/components/prFiles/FileDiffPane.tsx b/vscode/webview-ui/src/components/prFiles/FileDiffPane.tsx index fda4676..9d5c9ae 100644 --- a/vscode/webview-ui/src/components/prFiles/FileDiffPane.tsx +++ b/vscode/webview-ui/src/components/prFiles/FileDiffPane.tsx @@ -14,7 +14,7 @@ import { generateDiffFile } from '@git-diff-view/file' import { DiffModeEnum, DiffView } from '@git-diff-view/react' import { Check, Loader2, Sparkles } from 'lucide-react' import { useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react' -import { statusBadge, statusColorVar } from './fileTree' +import { statusBadge, statusColorVar } from './fileTreeModel' import '@git-diff-view/react/styles/diff-view.css' interface FileDiffPaneProps { diff --git a/vscode/webview-ui/src/components/prFiles/FileTree.tsx b/vscode/webview-ui/src/components/prFiles/FileTree.tsx index f59510e..7f961b7 100644 --- a/vscode/webview-ui/src/components/prFiles/FileTree.tsx +++ b/vscode/webview-ui/src/components/prFiles/FileTree.tsx @@ -5,10 +5,10 @@ * 纯展示 + 回调:折叠态/选中态/已确认集合都由容器持有,本组件只发语义回调。 */ -import type { TreeRow } from './fileTree' +import type { TreeRow } from './fileTreeModel' import { Check, ChevronDown, ChevronRight, Folder } from 'lucide-react' import { useState } from 'react' -import { statusBadge, statusColorVar } from './fileTree' +import { statusBadge, statusColorVar } from './fileTreeModel' interface FileTreeProps { rows: TreeRow[] diff --git a/vscode/webview-ui/src/components/prFiles/fileTree.ts b/vscode/webview-ui/src/components/prFiles/fileTreeModel.ts similarity index 100% rename from vscode/webview-ui/src/components/prFiles/fileTree.ts rename to vscode/webview-ui/src/components/prFiles/fileTreeModel.ts