chore: 清理 src 下 113 项未使用导入和死代码

删除未使用的文件(BuiltinStatusLine.tsx、4 个重复的 .ts stub)、
移除约 55 个文件中未使用的 React 导入、
清理约 50 处未使用的导入/变量/参数。
净减少 ~296 行代码,precheck 4077 测试全部通过。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
claude-code-best
2026-05-05 20:05:15 +08:00
parent 87b96199f9
commit fcbc882232
113 changed files with 63 additions and 359 deletions

View File

@@ -18,7 +18,7 @@ import {
import { FileTooLargeError, readFileInRange } from './readFileInRange.js'
import { expandPath } from './path.js'
import { countCharInString } from './stringUtils.js'
import { count, uniq } from './array.js'
import { uniq } from './array.js'
import { getFsImplementation } from './fsOperations.js'
import { readdir, stat } from 'fs/promises'
import type { IDESelection } from '../hooks/useIdeSelection.js'
@@ -37,9 +37,7 @@ import {
import { getPlanFilePath, getPlan } from './plans.js'
import { getConnectedIdeName } from './ide.js'
import {
filterInjectedMemoryFiles,
getManagedAndUserConditionalRules,
getMemoryFiles,
getMemoryFilesForNestedDirectory,
getConditionalRulesForCwdLevelDirectory,
type MemoryFileInfo,
@@ -63,7 +61,6 @@ import {
isValidImagePaste,
} from 'src/types/textInputTypes.js'
import { randomUUID, type UUID } from 'crypto'
import { getSettings_DEPRECATED } from './settings/settings.js'
import { getSnippetForTwoFileDiff } from '@claude-code-best/builtin-tools/tools/FileEditTool/utils.js'
import type {
ContentBlockParam,
@@ -72,7 +69,6 @@ import type {
} from '@anthropic-ai/sdk/resources/messages.mjs'
import { maybeResizeAndDownsampleImageBlock } from './imageResizer.js'
import type { PastedContent } from './config.js'
import { getGlobalConfig } from './config.js'
import {
getDefaultSonnetModel,
getDefaultHaikuModel,
@@ -3533,7 +3529,7 @@ async function getAsyncHookResponseAttachments(): Promise<Attachment[]> {
hookName,
hookEvent,
toolName,
pluginId,
pluginId: _pluginId,
stdout,
stderr,
exitCode,

View File

@@ -1,7 +1,6 @@
import axios from 'axios';
import chalk from 'chalk';
import { randomUUID } from 'crypto';
import React from 'react';
import { getOriginalCwd, getSessionId } from 'src/bootstrap/state.js';
import { checkGate_CACHED_OR_BLOCKING } from 'src/services/analytics/growthbook.js';
import {