Commit Graph

592 Commits

Author SHA1 Message Date
claude-code-best
aa06cea904 fix: 修正 GLM 模型 GitHub 署名邮箱为 zai-org
Co-Authored-By: glm-5.1[1m] <zai-org@users.noreply.github.com>
2026-05-07 11:35:40 +08:00
claude-code-best
c43efecbab feat: 署名邮箱改为 GitHub noreply 格式并新增模型映射
Co-Authored-By: glm-5.1[1m] <zhipuai@users.noreply.github.com>
2026-05-07 11:32:48 +08:00
claude-code-best
cb4a6e76cf feat: 添加自动邮箱映射功能并完善署名系统
- 新增 attributionEmail.ts 实现模型名到邮箱的自动映射
- 重构署名逻辑,统一使用 getRealModelName() 和 getAttributionEmail()
- 将产品名从 Claude Code 更新为 Claude Code Best
- 更新 PRODUCT_URL 指向 claude-code-best fork 仓库

Co-Authored-By: glm-4.7 <noreply@zhipuai.cn>
2026-05-07 11:12:40 +08:00
claude-code-best
f7f69b759c fix: 修复模型别名未解析导致署名显示 "haiku" 而非真实模型名
去掉 getUserSpecifiedModelSetting() 分支,统一走 getMainLoopModel()(解析别名)
+ resolveProviderModel()(解析 provider 映射)的完整链路。

Co-Authored-By: opus[1m] <noreply@anthropic.com>
2026-05-07 11:10:01 +08:00
claude-code-best
771e3dbcf0 fix: 修复非 Anthropic provider 署名模型名获取错误
getRealModelName() 现在会检查 provider 特定环境变量(OPENAI_MODEL、GEMINI_MODEL、GROK_MODEL),
确保通过这些变量设置模型时署名显示真实名称而非 Anthropic 默认模型名。

Co-Authored-By: opus[1m] <noreply@anthropic.com>
2026-05-07 10:57:14 +08:00
claude-code-best
e3c0699f5b feat: 添加 prompt 缓存命中率检测与警告功能
每次 API 请求后自动计算缓存命中率,低于阈值(默认 80%)时在对话流中显示黄色警告消息。
同时更新 /context 命令输出中显示缓存命中率。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-07 10:49:06 +08:00
claude-code-best
e8759f3402 fix: 禁用 opus[1m] 自动迁移,尊重用户手动删除 [1m] 后缀的选择
迁移逻辑过于激进,用户手动删除 [1m]] 后会被自动加回。
现在将 migrateOpusToOpus1m 改为 no-op,保留用户的手动模型选择。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-05-07 09:33:56 +08:00
claude-code-best
958ac3a0d5 feat: 开启部分被关闭的 feature 2026-05-07 09:14:58 +08:00
claude-code-best
5895362178 chore: 2.2.0 v2.2.0 2026-05-07 08:29:07 +08:00
claude-code-best
8cfe9b6dc3 feat: 启用 COORDINATOR_MODE feature flag
AgentSummary 30s fork 循环的内存泄露已在 commit 52b61c2c 修复(闭包
引用丢弃 + 上下文重建 + 消息/字符上限),重新启用该 feature。

用户可通过 /coordinator 命令或 CLAUDE_CODE_COORDINATOR_MODE=1 环境变量
激活多 worker 编排模式。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-07 08:28:28 +08:00
claude-code-best
12f5aedf99 fix: 恢复消息流中 diff 高亮渲染功能
还原 commit 51b8ad46 删除的 diff highlight 显示:FileEdit/FileWrite 工具
执行成功后重新展示 StructuredDiffList,拒绝时重新展示高亮代码预览或
带上下文的 diff 视图。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-07 08:28:28 +08:00
claude-code-best
c7efac6b8d Merge pull request #423 from znygugeyx-ctrl/feat/statusline-refresh-interval
feat: 状态栏支持 refreshInterval 定时刷新
2026-05-06 23:53:36 +08:00
zny
2f150d3ecd feat: 状态栏支持 refreshInterval 定时刷新
- Zod schema 补齐 refreshInterval 字段
- 通过 scheduleUpdate 复用 300ms debounce,event/settings/time 三路触发单飞
- 新增 docs/features/status-line.mdx 调研文档
2026-05-06 22:50:11 +08:00
claude-code-best
68c7ebb242 Merge pull request #419 from suger-m/codex/sub-agents-docs
docs: expand sub-agent architecture guide
2026-05-06 20:30:42 +08:00
claude-code-best
9e299a7208 Merge pull request #420 from claude-code-best/fix/third-party-api-user-id
fix: third-party API user_id validation error (DeepSeek, etc.)
2026-05-06 20:30:12 +08:00
Simple6K
941bcbd240 fix: third-party API user_id validation error (DeepSeek, etc.)
When ANTHROPIC_BASE_URL points to a non-Anthropic endpoint (e.g.
DeepSeek), the JSON-formatted user_id containing {, ", : characters
fails validation against ^[a-zA-Z0-9_-]+$. Send only the hex device_id
for third-party providers.
2026-05-06 17:47:31 +08:00
suger-m
fd66ddc45f docs: expand sub-agent architecture guide 2026-05-06 17:26:49 +08:00
znygugeyx-ctrl
5c107e5f8c Merge pull request #416 from znygugeyx-ctrl/feat/subagent-fork-render
feat: 参考 claude code 官方实现,改进 sub agent 以及 fork agent 的渲染方式
2026-05-06 09:57:52 +08:00
claude-code-best
c4e9efb7a8 Merge pull request #417 from shaleloop/sync/mcp-transform-2.1.128
fix: align mcp transform pipeline with Anthropic Claude Code 2.1.128
2026-05-06 09:51:37 +08:00
shaleloop
26ddbda849 fix: align mcp transform pipeline with Anthropic Claude Code 2.1.128
Add ImageLimits type and plumb optional limits through the chain:
callMCPTool/callMCPToolWithUrlElicitationRetry -> processMCPResult ->
transformMCPResult -> transformResultContent -> maybeResizeAndDownsampleImageBuffer.
When provided, limits override the module-level defaults
(IMAGE_TARGET_RAW_SIZE, IMAGE_MAX_WIDTH, IMAGE_MAX_HEIGHT,
API_IMAGE_MAX_BASE64_SIZE) inside maybeResizeAndDownsampleImageBuffer.
When undefined, behavior is unchanged for current callers.

Add _meta preservation in the text-block case of transformResultContent
(only when the caller opts in via includeMeta=true). transformMCPResult
passes includeMeta=true on the tool-result path; the prompt-handler call
site keeps the default false, preserving prior behavior.

Add skipLargeOutput early-return in processMCPResult after the IDE check:
when the caller passes skipLargeOutput=true and the content has no images,
the function returns content directly without large-output handling.

Add unwrap-to-text in processMCPResult for the persisted-content path:
when the large-string format gate is enabled
(MCP_TRUNCATION_PROMPT_OVERRIDE env var, or
tengu_mcp_subagent_prompt Statsig gate), and the content is a single
bare text block (no annotations, no _meta), unwrap to raw text and
switch the format description to 'Plain text'. Default-off; gate-off
behavior is unchanged.

Verified structurally against the 2.1.128 binary: function signatures,
the IDE check, gate logic, _meta-unwrap pattern, and imageLimits
plumbing match this implementation.
2026-05-05 14:53:57 -07:00
claude-code-best
872ee280e3 chore: 2.1.0 v2.1.0 memory-leak-fixed 2026-05-05 21:22:20 +08:00
claude-code-best
f5c9880d7d Merge pull request #413 from claude-code-best/performance/20260505/memory-leak-fix
feat: 继续进行内存泄露修复及垃圾代码清理
2026-05-05 21:21:22 +08:00
claude-code-best
3f1c8468bf fix: 调小 snapshots 的范围 2026-05-05 21:09:02 +08:00
claude-code-best
100e9d2da0 chore: 2.0.5 v2.0.5 2026-05-05 20:16:44 +08:00
claude-code-best
0ad6349434 chore: 清理 18 处未使用导入、变量和函数
移除未使用的导入(getSubscriptionType、isEnvDefinedFalsy、
getClaudeConfigHomeDir 等)、未使用的常量(ACCENT_COLOR、
NAME_MATCH_BONUS、CLIPBOARD_THRESHOLD)和死函数
(getOpus41Option、pasteViaClipboard),
为未使用参数添加 _ 前缀。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-05 20:15:51 +08:00
claude-code-best
1ac18aec0d chore: 清理 4 处遗漏的未使用导入和参数
移除 autonomyStatus/betas/claudemd/executorCrossPlatform 中
未使用的导入和参数。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-05 20:05:50 +08:00
claude-code-best
fcbc882232 chore: 清理 src 下 113 项未使用导入和死代码
删除未使用的文件(BuiltinStatusLine.tsx、4 个重复的 .ts stub)、
移除约 55 个文件中未使用的 React 导入、
清理约 50 处未使用的导入/变量/参数。
净减少 ~296 行代码,precheck 4077 测试全部通过。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-05 20:05:15 +08:00
claude-code-best
a1108870e3 Merge pull request #412 from claude-code-best/feature/20260504/improve
feat: 内存碎片及死代码清理
2026-05-05 19:48:12 +08:00
claude-code-best
87b96199f9 feat: ai 的随机修复 2026-05-05 19:36:38 +08:00
claude-code-best
18d6656a6a feat: 尝试改进 Error 处理以提升内存管理效率 2026-05-05 18:18:13 +08:00
claude-code-best
d0915fc880 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>
2026-05-05 16:07:30 +08:00
claude-code-best
cf2bf29dcd feat: 尝试深度拷贝数据以分离引用 2026-05-05 12:41:01 +08:00
claude-code-best
75952bde9c fix: 尝试请求参数克隆以解除闭包引用 2026-05-05 09:29:09 +08:00
claude-code-best
e7220c530f fix: eliminate memory leak in promptCacheBreakDetection by replacing closures with pre-computed strings
The buildDiffableContent and buildPrevDiffableContent fields were closures
capturing full system prompt and tool schema arrays (~300KB each). With 10
map entries × 2 closures, this held ~6MB of GC-unreachable memory.

Since recordPromptState already serializes the same data for hashing,
pre-computing the diffable content string has negligible marginal cost.
2026-05-05 08:54:04 +08:00
claude-code-best
6ff839d625 fix: 优化压缩错误消息和自动压缩提示的可理解性
- "Not enough messages" 添加 "Send a few more messages first" 引导
- "Conversation too long" 提示从模糊的 "Press esc twice" 改为建议 /compact 或 /clear
- 自动压缩标题从 "Compact summary" 改为 "Conversation summarized to free up context"
- 快捷键提示从 "expand" 改为 "view summary"
- 新增 7 个测试覆盖压缩相关消息

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-05 07:19:19 +08:00
claude-code-best
88057b10d4 fix: 优化 ModelPicker 副标题和 resume 错误提示的可操作性
- ModelPicker 副标题从技术说明改为操作提示(effort 调整、1M 切换)
- /resume 错误提示添加 "Run /resume to browse" 操作引导
- 新增 6 个测试覆盖模型选择器、会话恢复和 cost 消息文案

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-05 02:14:07 +08:00
claude-code-best
4d0048a60a fix: 优化权限提示用词和 Help 页面新手引导
- Help General 页添加 3 步 Getting started 引导,替代单段描述
- 权限对话框底部 "Esc to cancel" → "Esc to reject","Tab to amend" → "Tab to add feedback"
- .claude/ 文件夹权限选项标签从 60 字符缩至 49 字符,避免窄终端截断
- 新增 10 个测试覆盖权限提示文案和帮助页引导内容

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-05 00:09:27 +08:00
claude-code-best
8a5ef8c9cb fix: 优化用户交互文案,为错误消息添加可操作提示
- 为 budget/turns/structured-output 三种错误消息添加 Tip 提示,指导用户如何继续
- Onboarding 安全步骤标题从 "Security notes" 改为更友好的 "Before you start, keep in mind"
- Trust Dialog 精简为两句核心信息,降低认知负荷
- 新增 7 个测试验证消息内容包含关键引导信息

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-05 00:05:35 +08:00
claude-code-best
f8a289b868 fix: 尝试修复 OTEL 的问题 2026-05-04 23:53:28 +08:00
claude-code-best
45c892fc18 revert: 恢复 HISTORY_SNIP 2026-05-04 23:51:36 +08:00
claude-code-best
5b333e2246 refactor: 从 package.json 动态读取版本号,避免版本漂移
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-04 23:44:47 +08:00
claude-code-best
5e215bb061 chore: v2.0.4 v2.0.4 memory-leak-fix 2026-05-04 23:25:20 +08:00
claude-code-best
b28de717dd perf: 优化内存与遥测管理,启用 Vite minify
- 禁用 HISTORY_SNIP feature flag 并新增 proactiveTruncate 防止无 compact_boundary 时内存无限增长
- 跳过未启用 telemetry 时的 OTel 初始化,防止长会话 PerformanceMeasure 堆积
- OTel 导出遇 401/403 自动关闭 reader,防止 handle 泄漏
- Vite 构建启用 minify

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-04 23:23:25 +08:00
claude-code-best
5c1be19511 docs: update contributors 2026-05-04 08:44:14 +00:00
claude-code-best
2545dcabfd fix: ccb update 使用 bun install -g @latest 替代 bun update -g
bun update -g 只更新到 package.json 版本范围内的最新版,无法跨版本升级。
改为 bun install -g @latest 与 npm 侧行为一致,强制拉取最新发布版。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-03 19:28:16 +08:00
claude-code-best
40fbc4afc4 chore: 2.0.3 v2.0.3 2026-05-03 17:33:14 +08:00
claude-code-best
d3eebfed15 build: Vite 单文件构建 + 修复 doubaoime-asr 打包后 WASM 加载失败
- vite.config.ts: codeSplitting: false 替代多 chunk 输出,产出单文件 dist/cli.js
- vite.config.ts: ssr.external 排除 doubaoime-asr/opus-encdec,避免 require.resolve 路径失效
- scripts/post-build.ts: 简化为直接处理单文件 dist/cli.js
- src/services/doubaoSTT.ts: 改进错误信息,输出具体异常内容便于排查

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-03 16:13:20 +08:00
claude-code-best
6becb8b2d4 fix: 修复 tasks.test.ts 类型错误与并发测试失败
- jsonStringify mock 参数类型改为 Parameters<typeof JSON.stringify>[1][] 消除 TS2769
- 并发测试改为顺序执行以适配 Bun 下 proper-lockfile 的 advisory lock 行为

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-03 10:24:01 +08:00
claude-code-best
3a2b6dde7c perf: 表格渲染效率升级 2026-05-03 10:10:47 +08:00
claude-code-best
4ca7a4895a test: 新增 tasks.ts CRUD 测试覆盖(37 个测试)及 code review 进度记录
审查任务管理 CRUD 模块:创建/读取/更新/删除、高水位标记、文件锁并发安全、
claimTask 竞态保护、resetTaskList、通知信号、并发创建唯一 ID 验证。

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-03 03:29:06 +08:00