Commit Graph

14 Commits

Author SHA1 Message Date
James Feng
9870abbd83 fix: resolve ~45 more unused-variable alerts across 35+ files
- @ant packages: computer-use-input, computer-use-mcp, computer-use-swift, ink, model-provider
- builtin-tools: AgentTool, BashTool, ExecuteTool, MonitorTool, PowerShellTool, SearchExtraToolsTool, WebSearchTool, bingAdapter, ScheduleCronTool
- Others: acp-link, image-processor-napi, sessionMemory, acp/agent
- UI: PromptInput, Notifications, SearchExtraToolsHint, Spinner, App

Fix ConsoleOAuthFlow.tsx regression from previous batch (doSave was accidentally removed)
2026-06-08 17:30:56 +08:00
James Feng
76c47956dd fix: resolve ~50 CodeQL alerts — unused, injection, type issues
unused-local-variable / useless-assignment (~30 alerts):
- mcp-client: manager.ts (11), connection.ts (3)
- acp-link: server.ts (4), rcs-upstream.ts
- remote-control-server: 10 files (SessionDetail, acp/client, transports, etc.)
- src: constants/tools.ts, attribution.ts, win32.ts, main.tsx, attachments.ts

log-injection (2):
- chromeNativeHost.ts, rcs-upstream.ts — apply sanitizeLog()

indirect-command-line-injection (4):
- imagePaste.ts: convert shell:true to explicit sh -c pattern

use-before-declaration (4):
- query.ts, claude.ts, tools.ts, attachments.ts — move feature() import up

comparison-between-incompatible-types (2):
- ExitPlanModePermissionRequest.tsx, useTerminalNotification.ts

shared: sensitive.ts — sanitizeLog() helper
2026-06-08 17:15:22 +08:00
James Feng
2b6cf08c7c fix: resolve 13 trivial-conditional alerts + remove community gemini
Trivial-conditional cleanup (13 alerts auto-closed):
- bashSecurity.ts: remove 3 redundant !inSingleQuote checks
- WebFetchTool/UI.tsx, WebSearchTool/UI.tsx: remove redundant guards
- theme.ts: simplify getStoredTheme() || defaultTheme
- EventStream.tsx: remove dead !replay check
- MCPRemoteServerMenu.tsx: remove redundant isAuthenticating
- managedEnv.ts: remove dead !env guard
- permissionSetup.ts: delete duplicate code block
- marketplaceHelpers.ts: simplify blockedValue || undefined
- toolExecution.ts: remove dead : '' ternary branch
- main.tsx: remove dead dynamicMcpConfig && guard
- attachments.ts: wire up suppressNextDiscovery (set flag before await)

Also: remove abandoned community gemini (src/services/api/gemini/)
and its routing from claude.ts. Upgrade CodeQL to security-and-quality.
2026-06-08 16:29:34 +08:00
James Feng
33a6217702 fix(type): eliminate 26 as any casts (partial batch, Codex interrupted) 2026-06-07 15:27:21 +08:00
James Feng
a648196c3c fix(tsc): Phase 2 — eliminate all Cannot find name errors (204→175)
- Fix 19 Cannot find name + 1 no exported member
- Variable name typos: filePath→_filePath, PermissionMode→PermissionName, etc.
- Missing imports: feature, readFileSync, ALL_MODEL_CONFIGS, etc.
- Stub definitions: suppressNextDiscovery, WORKFLOW_TOOL_NAME_VALUE
- 0 remaining Cannot find module/name/export errors
2026-06-07 10:49:56 +08:00
claude-code-best
1201d88c37 docs: 添加 ToolSearch 设计指南 + 禁用 turn-zero 工具推荐弹窗
- 新增 docs/design/tool-search-design-guide.md,涵盖架构、搜索算法、执行管道、演进历史
- 禁用 getTurnZeroSearchExtraToolsPrefetch,消除用户输入时的频繁弹窗
- inter-turn 发现机制保持不变

Co-Authored-By: glm-5-turbo <zai-org@claude-code-best.win>
2026-06-07 00:56:16 +08:00
James Feng
be722795da chore: merge fcbc8822 — remove 113 unused imports and dead code
- 95 files modified (307 deletions, 92 insertions)
- Removed unused React imports from ~55 components
- Cleaned ~50 unused imports/variables/parameters
- 10 files skipped (version drift, CCP structure differences)

Source: upstream CCB fcbc8822
Note: --no-verify — pre-existing TS1005 errors in 130 remaining stubs
2026-06-06 21:18:36 +08:00
James Feng
0c01c93e80 Phase 2a: mechanical dedup — import rewrite to canonical package
- Migrated src/tools/-only files into packages/builtin-tools/src/tools/
- Rewrote all src/tools/ imports to @claude-code-best/builtin-tools/tools/
- Deleted 121 identical duplicate files from src/tools/
- 238 drifted files preserved in src/tools/ for Phase 2b manual merge
- 359 files changed: 914 insertions, 4042 deletions

Build: 568 files bundled ✓
Test: 3340 pass / 4 fail (baseline) ✓
2026-06-03 13:54:22 +08:00
James Feng
2c31cc2723 Fix Vite runtime requires for restored features 2026-06-01 21:23:28 +08:00
James Feng
69f7c8ff19 Merge Langfuse tracing integration 2026-06-01 19:52:12 +08:00
James Feng
ed197502af fix: resolve tsc errors (remaining upstream type fixes) 2026-06-01 19:01:38 +08:00
claude-code-best
fac9341e73 feat: 全面清理类型错误 — tsc 零错误,any 标注全部消除
- 修复所有 33 个原始 tsc 编译错误(ink JSX 声明、类型不匹配、null check 等)
- 清理 176 处 `: any` 类型标注,全部替换为具体推断类型
- 修复清理过程中引入的 41 个回归错误
- 最终结果:0 tsc 错误,0 个非注释 any 标注
- Build 验证通过(25.75MB bundle)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-01 01:00:10 +08:00
claude-code-best
d7a729ca68 feat: 完成第二版类型清理 2026-03-31 23:03:47 +08:00
claude-code-best
f90eee85d8 feat: build 2026-03-31 19:22:47 +08:00