claude-code-best
|
aaabf0c168
|
Revert "feat: 添加 GBK 编码自动检测支持,文件读写工具透明处理非 UTF-8 文件"
This reverts commit 0ce8f7a1cb.
|
2026-05-10 22:57:30 +08:00 |
|
claude-code-best
|
0ce8f7a1cb
|
feat: 添加 GBK 编码自动检测支持,文件读写工具透明处理非 UTF-8 文件
新增 encoding.ts 核心模块实现三层编码检测(BOM → UTF-8 fatal → GBK 回退),
改造同步/异步读取路径和写入路径,使 FileReadTool/FileEditTool/FileWriteTool
能正确处理 GBK 编码文件。包含完整单元测试和 spec 文档。
Co-Authored-By: glm-5-turbo <zai-org@claude-code-best.win>
|
2026-05-10 20:50:12 +08:00 |
|
claude-code-best
|
0707284939
|
docs: 更新 CLAUDE.md — 同步 workspace 包数量、feature flags、工具目录等变更
Co-Authored-By: glm-5-turbo <zai-org@claude-code-best.win>
|
2026-05-09 17:50:55 +08:00 |
|
claude-code-best
|
2cf18c4c49
|
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-05-09 16:45:56 +08:00 |
|
claude-code-best
|
7be08f53bd
|
feat: 实现 Tool Search 基础设施层(CORE_TOOLS 白名单 + TF-IDF 索引 + ExecuteTool + 搜索增强)
- 新增 CORE_TOOLS 白名单常量(31 个核心工具),重构 isDeferredTool 为白名单制判定
- 新建 TF-IDF 工具索引模块(toolIndex.ts),复用 localSearch.ts 算法函数
- 新建 ExecuteTool 跨 API provider 统一工具执行入口
- 增强 ToolSearchTool:TF-IDF 搜索路径、discover: 模式、并行搜索合并、文本模式回退
- 新增 27 个单元测试,precheck 零错误通过(4108 tests pass)
Co-Authored-By: glm-5.1[1m] <zai-org@claude-code-best.win>
|
2026-05-08 22:29:15 +08:00 |
|
claude-code-best
|
198c09b263
|
fix: 内存优化 — 预测性 compact 阈值、增量 lookups orphaned 修复、deferred slice 引用优化
- P0: REPL.tsx 用 useMemo 包裹 deferred messages slice,避免每次渲染创建新数组引用导致不必要的后台重渲染
- P1: 预测性 compact 阈值改用 effectiveContextWindow - growth,消除与 autocompact buffer 的双重预留;TOOL_RESULT_GROWTH_ESTIMATE 从 20K 降至 15K
- P2: 增量 lookups 增加 lastAssistantMsgId 一致性检查和 orphaned server_tool_use/mcp_tool_use 扫描,防止 UI 永久 loading
- P3: reactiveCompact 类型断言改为直接使用 'compact' 字面量
- docs: CLAUDE.md 统一使用 precheck 替代分散的 typecheck/lint/test 命令
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
2026-05-02 20:32:00 +08:00 |
|
claude-code-best
|
ef10ad2839
|
fix: 优化内存峰值与 CPU 性能,降低 100-300MB 内存占用
- claude.ts: 流式字符串拼接从 O(n²) += 改为数组累积 join,消除 4 处热点
- Messages.tsx: 合并 3 组独立遍历为单次 pass(thinking/bash 查找、3-filter 链、divider/selectedIdx)
- HighlightedCode.tsx: ColorFile 实例添加模块级 LRU 缓存(50 条),避免重复创建
- screen.ts: StylePool 衍生缓存添加 1000 条上限淘汰,防止无界增长
- CompanionSprite.tsx: TICK_MS 从 500ms 提升至 1000ms,减少 setState 频率
- connection.ts: MCP stderr 缓冲从 64MB 降至 8MB
- stringUtils.ts: MAX_STRING_LENGTH 从 32MB 降至 2MB
- sessionStorage.ts: Transcript 写入队列添加 1000 条上限
- query.ts: spread 改 concat 减少一次数组拷贝
- PromptInputFooterLeftSide.tsx: 显示进程 pid 便于调试
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
2026-05-02 00:45:03 +08:00 |
|
claude-code-best
|
a81995052f
|
docs: 更新 CLAUDE.md 中 Biome 覆盖范围和 lint/tsc 冲突处理规则
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
2026-05-01 22:06:15 +08:00 |
|
claude-code-best
|
6182015005
|
style: 完成所有文件的lint
|
2026-05-01 21:39:30 +08:00 |
|
claude-code-best
|
a8ed0cdce5
|
fix: 修复构建后 vendor 二进制路径解析错误(ripgrep/audio-capture)
构建后 chunk 文件位于 dist/chunks/(Vite)或 dist/(Bun),vendor 二进制在
dist/vendor/,但 ripgrep 和 audio-capture 的路径解析未考虑 chunks/ 层级,
导致 ENOENT。改用 import.meta.url 路径中 lastIndexOf('dist') 定位 dist 根,
并同步在 build.ts 和 post-build.ts 中添加 ripgrep vendor 文件复制。
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
2026-04-25 14:46:02 +08:00 |
|
claude-code-best
|
c07ad4c738
|
chore: 清理仓库审计问题——修正 CLAUDE.md、删除冗余 yoga-layout、清除 621 个未使用的类型 stub (#354)
- 修正 CLAUDE.md/AGENTS.md 六处过时陈述:modifiers-napi、url-handler-napi 已非 stub,
Magic Docs/LSP Server/Plugins/Marketplace 已恢复
- 删除未使用的 src/native-ts/yoga-layout/ 冗余副本(2715 行),权威版本保留在 packages/@ant/ink
- 删除 src/ 下 621 个 Auto-generated type stub 文件(全部 export type X = any,无活跃引用)
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
|
2026-04-25 08:54:18 +08:00 |
|
claude-code-best
|
eadd32ae47
|
docs: 同步 AGENTS.md 与 CLAUDE.md
|
2026-04-24 15:05:05 +08:00 |
|
claude-code-best
|
1173a62301
|
refactor: 统一 log.ts/debug.ts 的测试 mock 为共享定义
- 新增 tests/mocks/log.ts 和 tests/mocks/debug.ts,覆盖源文件全部实际导出
- 移除旧 mock 中不存在的导出(logToFile、logEvent、getLogFilePath)
- 13 个测试文件改为使用共享 mock,避免定义分散和不一致
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
2026-04-23 11:39:53 +08:00 |
|
claude-code-best
|
e4ce08fe39
|
Fixture/langfuse record auto mode data error (#308)
* fix: 修复状态栏 context 计数器在 loading 时闪现为 0 的问题
第三方 API(如智谱)在 message_start 中可能不返回完整 usage 数据,
导致 getCurrentUsage 返回全零 usage 对象,使 ctx 显示为 0%。
双重保护:
- getCurrentUsage: 跳过全零 usage,继续往前找有真实数据的 message
- calculateContextPercentages: totalInputTokens 为 0 时返回 null
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: 外部化 ESM 包使用 createRequire 替代裸 require
color-diff-napi、image-processor-napi、audio-capture-napi 声明
"type": "module" 但使用裸 require(),Node.js ESM 中 require
不可用。改用 createRequire(import.meta.url) 或顶层 import。
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: getDefaultSonnetModel 优先使用用户配置的模型,修复第三方 provider 模型不存在错误
当用户通过 ANTHROPIC_MODEL 或 settings 配置了自定义 provider 支持的模型时,
getDefaultSonnetModel/Haiku/Opus 现在会优先使用该配置,而非硬编码 Anthropic 官方模型 ID。
同时改进 Langfuse 可观测性:sideQuery 失败时记录错误信息到 span,
optional 模式下标记 WARNING 而非 ERROR。
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: 将 auto_mode classifier 的 side-query span 绑定到父 trace
classifyYoloAction 及 classifyYoloActionXml 接收 parentSpan 参数,
透传给 sideQuery 调用,使 auto_mode 的 side-query span 嵌套在主 agent trace 下。
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: 穷鬼模式下跳过 memdir_relevance side-query
Poor mode 启用时不执行 findRelevantMemories 的预取调用,
避免额外的 API token 消耗。
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* chore: 添加 test:all 脚本用于完成任务后的全量检查
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: Vite 构建补齐缺失的 feature flags,修复 auto mode 不可见
Vite 构建插件的 DEFAULT_BUILD_FEATURES 缺少 BUDDY、TRANSCRIPT_CLASSIFIER、
BRIDGE_MODE、ACP、BG_SESSIONS、TEMPLATES,导致 feature('TRANSCRIPT_CLASSIFIER')
被替换为 false,auto mode 从 Shift+Tab 循环中消失。与 build.ts 对齐。
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: 统一 feature flags 到 defines.ts,修复 Vite 构建缺失 auto mode
将 DEFAULT_BUILD_FEATURES 列表从 build.ts、dev.ts、vite-plugin-feature-flags.ts
三处内联定义统一到 scripts/defines.ts 单一导出。之前的 Vite 插件缺少
TRANSCRIPT_CLASSIFIER 等 feature flag,导致 auto mode 在 Vite 构建中不可见。
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
|
2026-04-20 13:30:05 +08:00 |
|
claude-code-best
|
2e9aaf4993
|
feat: ACP 协议版本 remote control (#293)
* fix: 添加 usage 字段缺失时的防御性防护
第三方 API(如智谱 GLM)在某些流式响应中不返回 usage 字段,
导致 usage.input_tokens 访问 undefined 崩溃并连锁影响后续所有请求。
- claude.ts: content_block_stop 创建消息时 fallback 到 EMPTY_USAGE
- LocalAgentTask.tsx: usage 为 undefined 时提前返回
- tokens.ts: getTokenCountFromUsage 加 null guard 和 ?? 0
- cost-tracker.ts: input_tokens/output_tokens 加 ?? 0
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat: ACP Plan 展示 — 支持 session/update plan 类型的可视化
补全 PlanUpdate 类型定义(PlanEntry/Priority/Status),新建 PlanView 组件
渲染进度条、状态图标和优先级标签,在 ChatInterface 中处理 plan 更新逻辑。
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat: 穷鬼模式下跳过 verification agent 以节省 token
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* test: 补充 RCS 后端 + 前端测试覆盖 (+116 tests)
后端新增 3 个测试文件 (70 tests):
- automationState: normalize/snapshot/equals 纯函数
- client-payload: toClientPayload 协议转换
- transport-normalize: normalizePayload + extractContent
前端新增 2 个测试文件 (46 tests):
- utils: formatTime/statusClass/truncate/extractEventText 等
- api-client: getUuid/setUuid/api GET/POST 错误处理
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat: RCS ACP 页面添加权限模式选择器 + 权限响应修复
- 新增权限模式选择器 UI(6种模式:默认/自动接受编辑/跳过权限/规划/不询问/自动判断)
- 权限模式通过 ACP _meta 从 web → acp-link → agent 全链路传递
- 修复 PermissionPanel 点击"允许"发送 cancelled 而非 selected 的 bug
- 权限模式和模型选择持久化到 localStorage
- acp-link 直接连接路径同步支持 permissionMode 透传
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat: RCS Web UI 重构 + QR 修复 + ACP 扫描自动跳转
- RCS Web UI 组件全面重构: Dialog 迁移 Radix UI, lazy loading,
主题系统改进, 组件样式优化
- IdentityPanel QR 码显示修复: requestAnimationFrame 延迟绘制
解决 Radix Dialog Portal 挂载时序问题
- ACP QR 扫描自动跳转: IdentityPanel 扫描 ACP 格式 { url, token }
后存储 sessionStorage 并跳转 /code/?acp=1
- 新增 ACPDirectView 组件: ACP 直连视图, 用 ACPClient 连接并
渲染 ACPMain 聊天界面
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* feat: ACP 权限管道改进 — 模式同步 + bypass 检测 + 统一权限流水线
- agent.ts: applySessionMode 同步 appState.toolPermissionContext.mode
- agent.ts: bypassPermissions 可用性检测 (非 root 或 sandbox 环境)
- permissions.ts: createAcpCanUseTool 接入 hasPermissionsToUseTool
统一权限流水线, 替代原来分散的处理逻辑
- permissions.ts: 支持 onModeChange 回调, 模式变更时实时同步
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: acp-link 支持 permissionMode 默认值传递给 agent
客户端 (Zed/VS Code 等) 的 new_session 不一定携带 permissionMode,
导致 agent 收到 _meta: undefined, permission 回退到 default。
修复: handleNewSession 使用 fallback 链:
客户端传值 > config.permissionMode > ACP_PERMISSION_MODE 环境变量
使用: ACP_PERMISSION_MODE=auto acp-link claude
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* docs: 更新文档及说明
* fix: 修复类型错误
* chore: 提交脚本
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
|
2026-04-18 21:54:22 +08:00 |
|
claude-code-best
|
29cc74a170
|
docs: 更新 CLAUDE.md
|
2026-04-17 21:37:43 +08:00 |
|
claude-code-best
|
c659912517
|
docs: 更新说明
|
2026-04-17 10:22:56 +08:00 |
|
claude-code-best
|
1a4e9702c2
|
fix: 修复类型问题(#267) (#271)
* fix: 修复 Bun 的 polyfill 问题
* fix: 类型修复完成
* feat: 统一所有包的类型文件
* fix: 修复构建问题
|
2026-04-15 10:54:00 +08:00 |
|
claude-code-best
|
2fea429dc6
|
feat: 添加对 langfuse 监控的支持 (#242)
* docs: 更新类型检查的 CLAUDE.md
* feat: 添加模型 1M 上下文切换
* chore: remove prefetchOfficialMcpUrls call on startup
* docs: 添加 git commit 规范
* feat: 第一次接入 langfuse
* fix: 修复 generation 的计时的错误
* feat: 添加多 agent 的监控
* feat: 添加 /poor 省流模式,toggle 关闭 extract_memories 和 prompt_suggestion
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* chore: 修复 lock 文件
* chore: 更新类型依赖
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
|
2026-04-11 22:07:38 +08:00 |
|
claude-code-best
|
6a9da9d546
|
docs: 添加 git commit 规范
|
2026-04-11 15:13:41 +08:00 |
|
claude-code-best
|
5beeebad59
|
docs: 更新类型检查的 CLAUDE.md
|
2026-04-11 15:13:41 +08:00 |
|
claude-code-best
|
875510e1eb
|
docs: update CLAUDE.md with architecture details and type safety guidelines
- Update build/dev mode descriptions to reflect current feature flags
- Add workspace packages table and multi-API compatibility layer docs
- Add Type Safety Guidelines section: prohibit `as any` in non-test code,
document proper alternatives (Record<string, unknown>, dual assertion,
type guards, specific SDK types)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
2026-04-09 23:55:05 +08:00 |
|
HitMargin
|
14dc54a093
|
gemini模型环境变量分离 provider指令支持切换gemini
|
2026-04-06 11:23:05 +08:00 |
|
HitMargin
|
eb6fbe518e
|
分离OpenAI和Anthropic模型的环境变量
|
2026-04-05 03:31:06 +08:00 |
|
claude-code-best
|
419d1e8bcc
|
docs: 更新 CLAUDE.md
|
2026-04-04 10:39:14 +08:00 |
|
claude-code-best
|
4a9e9185b1
|
docs: 更新文档
|
2026-04-03 20:23:51 +08:00 |
|
claude-code-best
|
47d88478c9
|
docs: 修正 feature 的正确用法
|
2026-04-02 21:37:30 +08:00 |
|
claude-code-best
|
006ad97fbb
|
test: 新增测试代码文件
|
2026-04-02 14:44:56 +08:00 |
|
claude-code-best
|
4c0a655a1c
|
feat: 大规模清理 claude 的类型问题及依赖
|
2026-03-31 22:21:35 +08:00 |
|