claude-code-best/src
claude-code-best bddd146f25
feat: 重构供应商层次 (#286)
* refactor: 创建 @anthropic-ai/model-provider 包骨架与类型定义

- 新建 workspace 包 packages/@anthropic-ai/model-provider
- 定义 ModelProviderHooks 接口(依赖注入:分析、成本、日志等)
- 定义 ClientFactories 接口(Anthropic/OpenAI/Gemini/Grok 客户端工厂)
- 搬入核心类型:Message 体系、NonNullableUsage、EMPTY_USAGE、SystemPrompt、错误常量
- 主项目 src/types/message.ts 等改为 re-export,保持向后兼容

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* refactor: 提升 OpenAI 转换器和模型映射到 model-provider 包

- 搬入 OpenAI 消息转换(convertMessages)、工具转换(convertTools)、流适配(streamAdapter)
- 搬入 OpenAI 和 Grok 模型映射(resolveOpenAIModel、resolveGrokModel)
- 主项目文件改为 thin re-export proxy

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* refactor: 搬入 Gemini 兼容层到 model-provider 包

- 搬入 Gemini 类型定义、消息转换、工具转换、流适配、模型映射
- 主项目 gemini/ 目录下文件改为 thin re-export proxy

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* refactor: 搬入 errorUtils 并迁移消费者导入到 model-provider

- 搬入 formatAPIError、extractConnectionErrorDetails 等 errorUtils
- 迁移 10 个消费者文件直接从 @anthropic-ai/model-provider 导入
- 更新 emptyUsage、sdkUtilityTypes、systemPromptType 为 re-export proxy

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat: compact 模型降级为 -1 模式(Opus→Sonnet, Sonnet→Haiku)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* docs: 添加 agent-loop 绘图

* Revert "feat: compact 模型降级为 -1 模式(Opus→Sonnet, Sonnet→Haiku)"

This reverts commit e458d6391d.

* docs: 添加简化版 agent loop

* fix: 修复 n 快捷键导致关闭的问题

* fix: 修复 node 下 ws 没打包问题

* docs: 修复链接

* test: 添加测试支持

* fix: 修复类型问题(#267) (#271)

* fix: 修复 Bun 的 polyfill 问题

* fix: 类型修复完成

* feat: 统一所有包的类型文件

* fix: 修复构建问题

* test: 修复类型校验 (#279)

* fix: 修复 Bun 的 polyfill 问题

* fix: 类型修复完成

* feat: 统一所有包的类型文件

* fix: 修复构建问题

* fix(remote-control): harden self-hosted session flows (#278)

Co-authored-by: chengzifeng <chengzifeng@meituan.com>

* docs: update contributors

* build: 新增 vite 构建流程

* feat: 添加环境变量支持以覆盖 max_tokens 设置

* feat(langfuse): LLM generation 记录工具定义

将 Anthropic 格式的工具定义转换为 Langfuse 兼容的 OpenAI 格式,
并在 generation 的 input 中以 { messages, tools } 结构传入,
以便在 Langfuse UI 中查看完整的工具定义信息。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat: 添加对 ACP 协议的支持 (#284)

* feat: 适配 zed acp 协议

* docs: 完善 acp 文档

* chore: 1.4.0

* conflict: 解决冲突

* feat: 添加测试覆盖率上报

* style: 改名加移动文件夹位置

* refactor: 移动测试用例及实现

* test: 修复测试用例完成

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Cheng Zi Feng <1154238323@qq.com>
Co-authored-by: chengzifeng <chengzifeng@meituan.com>
Co-authored-by: claude-code-best <272536312+claude-code-best@users.noreply.github.com>
2026-04-17 09:33:14 +08:00
..
__tests__ Feat/integrate lint preview (#285) 2026-04-16 20:59:29 +08:00
assistant Feat/integrate lint preview (#285) 2026-04-16 20:59:29 +08:00
bootstrap feat: 工具层及 mcp 大重构 (#252) 2026-04-13 09:52:05 +08:00
bridge feat: 重构供应商层次 (#286) 2026-04-17 09:33:14 +08:00
buddy feat: 全部类型问题解决 2026-04-11 10:24:00 +08:00
cli feat: 重构供应商层次 (#286) 2026-04-17 09:33:14 +08:00
commands feat: 重构供应商层次 (#286) 2026-04-17 09:33:14 +08:00
components feat: 重构供应商层次 (#286) 2026-04-17 09:33:14 +08:00
constants feat: 工具层及 mcp 大重构 (#252) 2026-04-13 09:52:05 +08:00
context Revert "Revert "feat: 第一个可以用的 ink 组件抽象 (#158)" (#175)" 2026-04-07 16:17:48 +08:00
coordinator feat: 工具层及 mcp 大重构 (#252) 2026-04-13 09:52:05 +08:00
daemon Feat/integrate lint preview (#285) 2026-04-16 20:59:29 +08:00
entrypoints feat: 重构供应商层次 (#286) 2026-04-17 09:33:14 +08:00
environment-runner feat: 全面清理类型错误 — tsc 零错误,any 标注全部消除 2026-04-01 01:00:10 +08:00
hooks Feat/integrate lint preview (#285) 2026-04-16 20:59:29 +08:00
jobs Feat/integrate lint preview (#285) 2026-04-16 20:59:29 +08:00
keybindings feat: 重构供应商层次 (#286) 2026-04-17 09:33:14 +08:00
memdir feat: 工具层及 mcp 大重构 (#252) 2026-04-13 09:52:05 +08:00
migrations feat: 完成stub 2026-03-31 20:40:16 +08:00
moreright 更新大量 tsx 原始文件; 已经迁移 login panel; 部分 (#121) 2026-04-04 23:24:27 +08:00
native-ts fix: 修复 @ typeahead 文件搜索无结果的问题 2026-04-01 17:11:09 +08:00
outputStyles feat: build 2026-03-31 19:22:47 +08:00
plugins feat: build 2026-03-31 19:22:47 +08:00
proactive Feat/integrate lint preview (#285) 2026-04-16 20:59:29 +08:00
query fix: 修复对穷鬼模式的 auto dream 和 session memory 越过 2026-04-12 23:24:12 +08:00
remote feat: 全部类型问题解决 2026-04-11 10:24:00 +08:00
schemas feat: 完成stub 2026-03-31 20:40:16 +08:00
screens Feat/integrate lint preview (#285) 2026-04-16 20:59:29 +08:00
self-hosted-runner feat: 全面清理类型错误 — tsc 零错误,any 标注全部消除 2026-04-01 01:00:10 +08:00
server feat: 全面清理类型错误 — tsc 零错误,any 标注全部消除 2026-04-01 01:00:10 +08:00
services feat: 重构供应商层次 (#286) 2026-04-17 09:33:14 +08:00
skills feat: 工具层及 mcp 大重构 (#252) 2026-04-13 09:52:05 +08:00
ssh feat: 全面清理类型错误 — tsc 零错误,any 标注全部消除 2026-04-01 01:00:10 +08:00
state feat: 工具层及 mcp 大重构 (#252) 2026-04-13 09:52:05 +08:00
tasks Feat/integrate lint preview (#285) 2026-04-16 20:59:29 +08:00
types feat: 重构供应商层次 (#286) 2026-04-17 09:33:14 +08:00
upstreamproxy feat: 问就是封包 2026-03-31 23:32:58 +08:00
utils feat: 重构供应商层次 (#286) 2026-04-17 09:33:14 +08:00
vim feat: build 2026-03-31 19:22:47 +08:00
voice feat: build 2026-03-31 19:22:47 +08:00
commands.ts Feat/integrate lint preview (#285) 2026-04-16 20:59:29 +08:00
context.ts feat: build 2026-03-31 19:22:47 +08:00
cost-tracker.ts feat: build 2026-03-31 19:22:47 +08:00
costHook.ts feat: build 2026-03-31 19:22:47 +08:00
dialogLaunchers.tsx feat: 工具层及 mcp 大重构 (#252) 2026-04-13 09:52:05 +08:00
history.ts feat: build 2026-03-31 19:22:47 +08:00
interactiveHelpers.tsx Revert "Revert "feat: 第一个可以用的 ink 组件抽象 (#158)" (#175)" 2026-04-07 16:17:48 +08:00
main.tsx Feat/integrate lint preview (#285) 2026-04-16 20:59:29 +08:00
projectOnboardingState.ts feat: build 2026-03-31 19:22:47 +08:00
query.ts fix: 修复 interrupt 日志不上传 2026-04-13 18:12:23 +08:00
QueryEngine.ts feat: 重构供应商层次 (#286) 2026-04-17 09:33:14 +08:00
replLauncher.tsx Revert "Revert "feat: 第一个可以用的 ink 组件抽象 (#158)" (#175)" 2026-04-07 16:17:48 +08:00
setup.ts feat: build 2026-03-31 19:22:47 +08:00
Task.ts feat: build 2026-03-31 19:22:47 +08:00
tasks.ts feat: build 2026-03-31 19:22:47 +08:00
Tool.ts feat: langfuse 工具调用显示为嵌套结构 2026-04-13 18:09:12 +08:00
tools.ts feat: 工具层及 mcp 大重构 (#252) 2026-04-13 09:52:05 +08:00