chore: 清理 src 下 33 项死代码和类型断言

删除未使用的文件/目录(mcp/adapter、cli/update.ts 等)、
未使用的重导出文件(design-system/color.ts 等 12 个)、
7 个零引用的导出函数、修复 5 处 as any 为精确类型。
净减少 ~1194 行代码,precheck 4077 测试全部通过。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
claude-code-best
2026-05-05 16:07:30 +08:00
parent cf2bf29dcd
commit d0915fc880
39 changed files with 12 additions and 1206 deletions

View File

@@ -1 +0,0 @@
export { Divider } from '@anthropic/ink';

View File

@@ -1 +0,0 @@
export { FuzzyPicker } from '@anthropic/ink';

View File

@@ -1 +0,0 @@
export { LoadingState } from '@anthropic/ink';

View File

@@ -1 +0,0 @@
export { Pane } from '@anthropic/ink';

View File

@@ -1 +0,0 @@
export { ProgressBar } from '@anthropic/ink';

View File

@@ -1 +0,0 @@
export { Ratchet } from '@anthropic/ink';

View File

@@ -1 +0,0 @@
export { StatusIcon } from '@anthropic/ink';

View File

@@ -1 +0,0 @@
export { Tab, Tabs, useTabHeaderFocus, useTabsWidth } from '@anthropic/ink';

View File

@@ -1 +0,0 @@
export { ThemeProvider, usePreviewTheme, useTheme, useThemeSetting } from '@anthropic/ink';

View File

@@ -1 +0,0 @@
export { Box as default } from '@anthropic/ink';

View File

@@ -1,29 +0,0 @@
import { type ColorType, colorize, type Color } from '@anthropic/ink'
import { getTheme, type Theme, type ThemeName } from '../../utils/theme.js'
/**
* Curried theme-aware color function. Resolves theme keys to raw color
* values before delegating to the ink renderer's colorize.
*/
export function color(
c: keyof Theme | Color | undefined,
theme: ThemeName,
type: ColorType = 'foreground',
): (text: string) => string {
return text => {
if (!c) {
return text
}
// Raw color values bypass theme lookup
if (
c.startsWith('rgb(') ||
c.startsWith('#') ||
c.startsWith('ansi256(') ||
c.startsWith('ansi:')
) {
return colorize(text, c, type)
}
// Theme key lookup
return colorize(text, getTheme(theme)[c as keyof Theme], type)
}
}

View File

@@ -1,18 +0,0 @@
// Type re-exports for DreamTask — bridges the component tree to the task registry.
// The real implementation lives in src/tasks/DreamTask/DreamTask.ts.
// Note: Currently unused — BackgroundTasksDialog.tsx imports directly from
// src/tasks/DreamTask/DreamTask.js. Kept for decompilation completeness.
export type {
DreamTaskState,
DreamPhase,
DreamTurn,
} from '../../../../../tasks/DreamTask/DreamTask.js'
export {
isDreamTask,
registerDreamTask,
addDreamTurn,
completeDreamTask,
failDreamTask,
DreamTask,
} from '../../../../../tasks/DreamTask/DreamTask.js'

View File

@@ -1,2 +0,0 @@
// Auto-generated stub — replace with real implementation
export {}

View File

@@ -1,2 +0,0 @@
// Auto-generated stub — replace with real implementation
export {}