Commit Graph

530 Commits

Author SHA1 Message Date
y574444354
ddb776cd5f refactor: 优化 Windows TTY 处理和代码风格统一
- scripts/dev.ts: 添加 CLAUDE_CODE_FORCE_INTERACTIVE 环境变量处理,优化 Windows 嵌套 Bun 启动时的交互模式检测
- cli.tsx: 统一代码风格(分号、引号),添加 ref/unref/setRawMode polyfill 以支持 Windows 环境
- model.ts: 优化模型选择逻辑,仅对 Anthropic 相关 provider 使用 ANTHROPIC_MODEL 环境变量
- sideQuery.ts: 更新导入路径,使用 @ant/model-provider 包
- README.md: 添加分隔线
2026-04-20 17:55:09 +08:00
y574444354
98a1ce35e4 readme 2026-04-20 08:58:37 +08:00
y574444354
2949737d28 chore: bump version to 4.0.8
- 更新版本号至 4.0.8
- 更新 CHANGELOG,记录本次同步上游的变更
2026-04-17 18:11:25 +08:00
y574444354
ebb6e905b8 docs: update contributors 2026-04-17 10:08:06 +00:00
y574444354
387029744d Merge branch 'upstream/main' into main
同步上游主仓库最新代码,包含以下更新:
- feat(remote-control): 优化 Web 展示、状态同步与桥接控制流程 (#288)
- build: CI 添加通过过滤
- fix: 解决 node 下 loading 按钮计算错误问题
- docs: 更新说明
- test: 修正 mock 的滥用情况
- fix: 修复 linux 端的安装问题
- feat: 重构供应商层次 (#286)
- Feat/integrate lint preview (#285)
- feat: 添加对 ACP 协议的支持 (#284)
- feat(langfuse): LLM generation 记录工具定义
- feat: 添加环境变量支持以覆盖 max_tokens 设置
- build: 新增 vite 构建流程
2026-04-17 17:59:48 +08:00
Cheng Zi Feng
72a2093cd6
feat(remote-control): 优化 Web 展示、状态同步与桥接控制流程 (#288)
Co-authored-by: chengzifeng <chengzifeng@meituan.com>
2026-04-17 16:21:27 +08:00
claude-code-best
b5c299f5d2 build: CI 添加通过过滤 2026-04-17 11:33:57 +08:00
claude-code-best
ac42ce2d67 fix: 解决 node 下 loading 按钮计算错误问题 2026-04-17 10:42:40 +08:00
claude-code-best
c659912517 docs: 更新说明 2026-04-17 10:22:56 +08:00
claude-code-best
a14b7f352b test: 修正 mock 的滥用情况 2026-04-17 10:13:09 +08:00
claude-code-best
c5ab83a3fc fix: 修复 linux 端的安装问题 2026-04-17 09:51:59 +08:00
claude-code-best
03b7f9b453 chore: 1.4.1 2026-04-17 09:45:36 +08:00
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
claude-code-best
c8d08d235b
Feat/integrate lint preview (#285)
* feat: 适配 zed acp 协议

* docs: 完善 acp 文档

* feat: integrate feature branches + daemon/job 命令层级化 + 跨平台后台引擎

Cherry-picked from origin/lint/preview (637c908), excluding lint-only changes.

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

* fix: correct detectMimeFromBase64 to decode raw bytes from base64

Cherry-picked from origin/lint/preview (ee36954).

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

* fix: daemon 子进程 spawn 跨平台修复 + CliLaunchSpec 集中化重构

Cherry-picked from origin/lint/preview (c5f52cd), excluding lint-only formatting changes.

- 新建 src/utils/cliLaunch.ts: 集中化 CLI 子进程启动层
- 修复 --daemon-worker=kind 等号格式解析
- 修复 daemon/bg fast path 缺少 setShellIfWindows()
- 修复 checkPathExists 用 existsSync 替代 execSync('dir')
- 7 个 spawn 站点迁移到 CliLaunchSpec

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

* fix: merge tsconfig.base.json into tsconfig.json with full compiler options

The cherry-pick from 637c908 dropped jsx/strict/etc settings when removing
tsconfig.base.json. This commit restores them in a single tsconfig.json.

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

* fix: merge tsconfig.base.json into tsconfig.json with full compiler options

The cherry-pick from 637c908 dropped jsx/strict/etc settings when removing
tsconfig.base.json. This commit restores them in a single tsconfig.json.

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

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-16 20:59:29 +08:00
claude-code-best
a02dc0bded chore: 1.4.0 2026-04-16 20:48:09 +08:00
y574444354
d67b7e4010 fix: 修复 Windows nvm4w 路径下 upgrade 命令识别为 development 的问题
- doctorDiagnostic: 增加 Windows nvm4w/nodejs 路径检测
- 路径比较时统一规范化分隔符,确保跨平台匹配
- chore: bump version to 4.0.8
2026-04-16 20:38:26 +08:00
claude-code-best
3cb1e50b25
feat: 添加对 ACP 协议的支持 (#284)
* feat: 适配 zed acp 协议

* docs: 完善 acp 文档
2026-04-16 20:31:50 +08:00
y574444354
928afd355d chore: bump version to 4.0.7 2026-04-16 20:05:15 +08:00
y574444354
50109ff9f5 Merge branch 'pr-31' 2026-04-16 19:57:47 +08:00
geroge
ae0c21765b
Merge pull request #32 from y574444354/feat/node-compat-polyfill-enhancement
feat: Node.js 兼容性增强与 CoStrict provider 修复
2026-04-16 19:56:04 +08:00
y574444354
132c682323 chore: 清理 .omc 缓存文件 2026-04-16 19:54:08 +08:00
y574444354
bd929f1db1 merge: 合并 main 分支,解决冲突 2026-04-16 19:53:05 +08:00
y574444354
e856ec1828 chore: 将 .omc/ 整个目录加入 gitignore 2026-04-16 19:51:43 +08:00
y574444354
fbeaf1395e fix: 修复 CoStrict provider 模型选择与 token 估算问题
- ConsoleOAuthFlow: 替换 ModelPicker 为直接 Select 组件,避免
  getAPIProvider() 竞态导致显示标准 Anthropic 模型列表
- modelOptions: 简化模型选项逻辑,CoStrict 凭证持有者统一走
  CoStrict 模型缓存路径,加载中显示提示而非标准模型列表
- provider/index: 回写 usage 和 stop_reason 到已 yield 的
  assistant messages,与 Anthropic 原生路径保持一致
- tokenEstimation: 非 Anthropic 原生 provider(costrict/openai/
  grok/gemini)统一使用粗略 token 估算
- 品牌文案: Claude → CoStrict 相关措辞修正
2026-04-16 19:12:01 +08:00
claude-code-best
cfab161e28 feat(langfuse): LLM generation 记录工具定义
将 Anthropic 格式的工具定义转换为 Langfuse 兼容的 OpenAI 格式,
并在 generation 的 input 中以 { messages, tools } 结构传入,
以便在 Langfuse UI 中查看完整的工具定义信息。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-16 15:31:18 +08:00
Askhz
13ec1d4510 chore: back fetch.ts 2026-04-16 15:29:09 +08:00
costrict
22fd08537a fix: 修复 fetch.ts preconnect 重复标识符类型错误
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-16 15:23:05 +08:00
Askhz
06be8bc88c fix: csc auth login 默认使用 CoStrict OAuth 登录
`csc auth login` 默认打开 CoStrict 登录页面而非 Claude OAuth 页面。
添加 --claudeai / --console 参数保留 Anthropic OAuth 作为备选。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-16 15:07:17 +08:00
claude-code-best
90027279e6 feat: 添加环境变量支持以覆盖 max_tokens 设置 2026-04-16 13:01:07 +08:00
claude-code-best
3470783ced build: 新增 vite 构建流程 2026-04-16 12:39:19 +08:00
y574444354
531bd9f735 chore: bump version to 4.0.6
- 版本号升级至 4.0.6
- CHANGELOG.md 新增 4.0.6 变更记录
- package.json 描述更新,undici 移至 dependencies
2026-04-16 11:29:23 +08:00
geroge
4790336d03
Merge pull request #28 from y574444354/sync/upstream-main-20250415
merge: sync upstream claude-code-best/claude-code main (1a4e970)
2026-04-16 11:08:42 +08:00
claude-code-best
da60b49b86 fix: 修复类型问题(#267) (#271)
* fix: 修复 Bun 的 polyfill 问题

* fix: 类型修复完成

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

* fix: 修复构建问题
2026-04-16 11:07:01 +08:00
claude-code-best
ca28559381 docs: 修复链接 2026-04-16 11:05:18 +08:00
claude-code-best
b241223e70 fix: 修复 node 下 ws 没打包问题 2026-04-16 11:05:18 +08:00
claude-code-best
f166165691 fix: 修复 n 快捷键导致关闭的问题 2026-04-16 11:04:23 +08:00
xixingde
e694ef6a1c docs: update contributors 2026-04-16 03:00:05 +00:00
xixingde
417a2ada18 Merge branch 'main' of https://github.com/y574444354/csc 2026-04-16 10:58:08 +08:00
claude-code-best
8169b96250 docs: update contributors 2026-04-16 02:46:47 +00:00
Cheng Zi Feng
fe08cacf8d
fix(remote-control): harden self-hosted session flows (#278)
Co-authored-by: chengzifeng <chengzifeng@meituan.com>
2026-04-16 10:46:31 +08:00
xixingde
b58f5b72b0 feat(agents): restrict Agent tool to specific sub-agents and add allowedTools to skills 2026-04-16 10:37:38 +08:00
claude-code-best
5a4c820e1d
test: 修复类型校验 (#279)
* fix: 修复 Bun 的 polyfill 问题

* fix: 类型修复完成

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

* fix: 修复构建问题
2026-04-16 10:28:47 +08:00
y574444354
81f54ed981 docs: update contributors 2026-04-16 02:17:43 +00:00
geroge
294289be5b
Merge pull request #29 from y574444354/feat/security-review-v2
Feat/security review v2
2026-04-16 10:17:29 +08:00
geroge
4be0266e95
Merge pull request #30 from y574444354/feat/node-compat-polyfill-enhancement
feat: 增强 Node.js 兼容性 — 扩展 Bun API polyfill 覆盖范围
2026-04-16 10:13:19 +08:00
xixingde
1e1d32205d Merge branch 'dev' of https://github.com/y574444354/csc into dev 2026-04-16 09:43:10 +08:00
xixingde
48eca1f35b fix(slash-command): propagate Agent(x,y,z) allowedAgentTypes restriction to forked command context 2026-04-16 00:14:36 +08:00
xixingde
28b0ecfaf2 fix(agents): remove isMainThread flag and update agent descriptions and tool restrictions 2026-04-15 22:27:50 +08:00
y574444354
003ff2d6cd feat: 增强 Node.js 兼容性 — 扩展 Bun API polyfill 覆盖范围
- build.ts: 大幅扩展 Node.js Bun polyfill,新增 spawn、spawnSync、
  file、gc、generateHeapSnapshot、embeddedFiles、semver、YAML、
  version、stringWidth、wrapAnsi、listen 等 API 实现
- package.json: 更新描述为多模型终端 AI 编程助手,Node.js 为主要
  运行时依赖,ws/yaml 移至 dependencies,bin 入口指向 cli-node.js
- scripts/defines.ts: 版本号更新至 4.0.5.1
- fetch.ts: fetch.preconnect 添加 Node.js 降级实现(net.createConnection)
2026-04-15 18:22:44 +08:00
kingboung
25d155e651 chore: 更新 .gitignore 添加 security-review_result 和 *.bun-build
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-15 17:17:58 +08:00