Commit Graph

190 Commits

Author SHA1 Message Date
y574444354
caa020365d Merge upstream/main: 同步上游更新并解决冲突 2026-04-09 19:15:29 +08:00
y574444354
51ff947604 feat(costrict): 集成 CoStrict 登录流程和模型选择到 /model 命令 2026-04-09 19:02:03 +08:00
bonerush
562e9daadd
fix: Handle undefined command names in getCommandName function (#217)
* fix: reorder tool and user messages for OpenAI API compatibility (#168)
Fixes #168
OpenAI requires that an assistant message with tool_calls be immediately
followed by tool messages. Previously, convertInternalUserMessage
output user content before tool results, causing 400 errors.
Now tool messages are pushed first.

* fix: 修复OpenAI兼容层中deferred tools处理问题

  提交描述:
  修复了在使用OpenAI兼容API时TaskCreate工具调用失败的问题。

  问题:
  - 当使用OpenAI兼容API模型时,调用TaskCreate工具出现"InputValidationError: The required
  parameter `subject` is missing"错误
  - OpenAI兼容层没有正确处理deferred tools的过滤逻辑,导致工具schema没有被正确发送给模型

  修复:
  1. 在OpenAI兼容层中添加了与Anthropic API路径一致的deferred tools处理逻辑
  2. 导入必要的工具搜索相关函数: isToolSearchEnabled, extractDiscoveredToolNames,
  isDeferredTool等
  3. 实现工具过滤逻辑:
     - 检查工具搜索是否启用
     - 构建deferred tools集合
     - 过滤工具列表: 只包含非deferred工具或已发现的deferred工具
     - 为deferred tools设置deferLoading标志
  4. 修正了extractDiscoveredToolNames函数的导入路径错误

  影响:
  - 解决了TaskCreate工具调用时的参数验证错误
  - 确保OpenAI兼容层与Anthropic API路径在处理deferred tools时行为一致
  - 支持工具搜索功能在OpenAI兼容模式下正常工作

  修改的文件:
  - src/services/api/openai/index.ts - 主要修复文件

  测试建议:
  1. 使用OpenAI兼容API模型时,TaskCreate工具应该可以正常调用
  2. 如果工具搜索功能启用,可能需要先使用ToolSearchTool来发现TaskCreate工具
  3. 验证工具调用时不再出现"InputValidationError"错误

  这个修复确保了当使用OpenAI兼容API(如Ollama、DeepSeek、vLLM等)时,deferred
  tools(如TaskCreate)能够被正确处理,解决了工具调用失败的问题。

* fix: 更新未发送工具架构提示,提供OpenAI兼容模型的使用步骤

* fix: Handle undefined command names in getCommandName function

- Modified getCommandName in src/types/command.ts to return empty string instead of undefined when cmd.name is undefined
- Added null checks in src/hooks/useTypeahead.tsx to safely handle command names
- Prevents "undefined is not an object" error when FEATURE_BUDDY=1 and FEATURE_FORK_SUBAGENT=1 are enabled

The error occurred because getCommandName(cmd) could return undefined when cmd.name was undefined, causing .length access to fail.
2026-04-09 17:53:43 +08:00
geroge
73c2121ee4
Merge pull request #11 from Askhz/refactor/change-config-path
refactor(provider): migrate credentials storage
2026-04-09 17:47:38 +08:00
claude-code-best
2da6514095
feat: 支持自托管的 remote-control-server (#214)
* feat: 支持自托管的 remote-control-server (#214)

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2026-04-09 17:40:50 +08:00
Askhz
1cedb89db8 refactor(provider): migrate credentials storage from ~/.costrict to ~/.claude directory 2026-04-09 17:26:44 +08:00
geroge
260a8140e3
Merge pull request #10 from y574444354/feat/rebrand-claude-code-to-costrict
rebrand: 将 Claude Code 品牌改为 CoStrict
2026-04-09 17:23:27 +08:00
y574444354
1c3e495c03 rebrand: 将 Claude Code 品牌改为 CoStrict 2026-04-09 17:14:39 +08:00
geroge
2d9996ab77
Merge pull request #8 from Askhz/feature/security-review
Add security review skill with code audit and bundling support
2026-04-09 16:45:57 +08:00
yhangf
51f597a3d2 feat(costrict): enable thinking mode in Anthropic-to-OpenAI message conversion 2026-04-09 16:40:45 +08:00
Askhz
df65350c35 feat(skill): add security review builtin skill with code audit support
- Add generate-skills script to download and bundle skills from external repositories.
- Register code-review-security skill for vulnerability detection and integrate into bundled skill initialization.
2026-04-09 15:59:14 +08:00
geroge
03b7cbf7de
Merge pull request #7 from yhangf/main
refactor: rename costrict/agent directory to costrict/agents
2026-04-09 15:49:09 +08:00
y574444354
824f09c34c chore: 更新配置和组件文件
- 更新 README_EN.md
- 更新认证和登录相关处理
- 更新登出功能
- 更新 AutoModeOptInDialog 和 Onboarding 组件
- 更新主入口文件
- 更新测试 fixtures
- 添加 docs/config-list.md
2026-04-09 15:42:48 +08:00
y574444354
fd9dc6dddd Merge branch 'main' of https://github.com/y574444354/csc 2026-04-09 15:38:23 +08:00
y574444354
78505312f4 feat: 更新 WelcomeV2 样式对齐和 ThemePicker 提示 2026-04-09 15:35:24 +08:00
yhangf
cc326e5b3b refactor: rename costrict/agent directory to costrict/agents 2026-04-09 15:28:02 +08:00
yhangf
26beb6fd36 Merge branch 'feature/tdd' 2026-04-09 15:17:12 +08:00
yhangf
1d70f31fef feat(tdd): add TDD workflow with test design, prepare, execute, and run-and-fix agents 2026-04-09 15:14:27 +08:00
xixingde
2ba63d15a5
Merge branch 'y574444354:main' into main 2026-04-09 14:36:33 +08:00
geroge
c7bfe22c22
Merge branch 'claude-code-best:main' into feat/basic-config 2026-04-09 14:35:26 +08:00
geroge
523db59b4b
Merge pull request #5 from y574444354/feat/basic-config
feat: 品牌化首页为 CoStrict 风格
2026-04-09 14:34:48 +08:00
y574444354
c5c6b50c9e feat: 品牌化首页为 CoStrict 风格
- 品牌名从 Claude Code 改为 CoStrict
- 版本号更新为 v4.0.1
- 首页边框、标题、分割线、小人等元素统一改为蓝色
- 简单模式(CondensedLogo)添加蓝色圆角边框
- 小人(Clawd)替换为 CoStrict ASCII art 大字标志
- Feed 标题(Recent activity/What's new)改为蓝色
2026-04-09 14:25:15 +08:00
xixingde
817fe6d42e Merge branch 'main' of https://github.com/xixingde/csc 2026-04-09 14:23:45 +08:00
xixingde
47fda685a3 refactor(agents): remove checkpoint workflow and file-outline from subCoding prompt 2026-04-09 14:17:28 +08:00
geroge
4100031042
Merge branch 'claude-code-best:main' into main 2026-04-09 14:15:38 +08:00
geroge
a9587e824d
Merge pull request #3 from Askhz/fix/setup-dialogs
fix(interactive): stop early input capture before rendering dialogs
2026-04-09 14:15:27 +08:00
yhangf
2c97a0f7d9 feat(skills): add project-wiki skill for automated technical documentation generation
Introduce `/project-wiki` bundled skill that orchestrates a multi-stage pipeline to
analyze a codebase and generate a complete technical documentation wiki. Adds four
specialized sub-agents:
- WikiProjectAnalyze: deep repository analysis and classification
- WikiCatalogueDesign: dynamic document structure design based on project traits
- WikiDocumentGenerate: code-driven technical document authoring
- WikiIndexGeneration: structured index and navigation creation
Also updates .gitignore to exclude `.costrict`, `.claude`, and `/costrict` directories.
2026-04-09 14:10:24 +08:00
xixingde
9cef68a360 refactor(strictPlan): update agent references from Explore to QuickExplore 2026-04-09 14:06:48 +08:00
xixingde
0c3b7e1cb2 feat(agents): add explicit tools list to planApply agent 2026-04-09 12:45:11 +08:00
xixingde
02d046a61e feat(agents): add QuickExploreAgent and enable planning agents by default 2026-04-09 12:42:11 +08:00
xixingde
792b784066 refactor(agents): standardize import paths and remove obsolete tool references 2026-04-09 11:34:40 +08:00
xixingde
80288a1c46 refactor(costrict): rename QuickExplore to Explore, standardize imports and remove dead code 2026-04-09 11:26:48 +08:00
xixingde
c15c952659 refactor(costrict): archive QuickExplore agent and update agent tool references 2026-04-09 11:19:03 +08:00
Askhz
3e0eed1462 Merge branch 'main' of https://github.com/Askhz/csc 2026-04-09 10:51:18 +08:00
Askhz
114629ff9e fix(interactive): stop early input capture before rendering dialogs
Rename CLI binary from `ccb` to `csc`, update .gitignore for additional
AI tool directories and exe files, and fix unresponsive keyboard input
in interactive dialogs by stopping the early input listener before Ink
takes over stdin.
2026-04-09 10:25:34 +08:00
xixingde
ab0ffd5c59 refactor(costrict): migrate agents to dedicated module and add new agent types 2026-04-09 10:10:20 +08:00
HitMargin
f17b7c7163
修复使用/help 后再按左右键报错 (#212)
* 添加status命令里更多模型api介绍

* Fix: /help error

---------

Co-authored-by: HitMargin <hitmargin@qq.com>
2026-04-09 09:18:35 +08:00
guunergooner
a3505aeec4
feat: Add DeepSeek thinking mode support for OpenAI compatibility layer (#206)
* feat: Add DeepSeek thinking mode support for OpenAI compatibility layer

- Add DeepSeek reasoning models support (deepseek-reasoner and DeepSeek-V3.2)
- Automatic thinking mode detection based on model name
- Inject thinking parameters in request body (both official API and vLLM formats)
- Preserve reasoning_content in message conversion for tool call iterations
- Extract buildOpenAIRequestBody() for testability
- Treat multimodal inputs (e.g. images) as new turn boundaries
- Fix env var cleanup in tests to prevent state leak

Signed-off-by: guunergooner <tongchao0923@gmail.com>

* docs: update contributors

---------

Signed-off-by: guunergooner <tongchao0923@gmail.com>
Co-authored-by: guunergooner <18660867+guunergooner@users.noreply.github.com>
2026-04-08 21:33:26 +08:00
bonerush
91ee1428fa
Fix bug OpenAI tooluse,Improve error messaging for deferred-loading tools under OpenAI‑compatible models. (#199)
* fix: reorder tool and user messages for OpenAI API compatibility (#168)
Fixes #168
OpenAI requires that an assistant message with tool_calls be immediately
followed by tool messages. Previously, convertInternalUserMessage
output user content before tool results, causing 400 errors.
Now tool messages are pushed first.

* fix: 修复OpenAI兼容层中deferred tools处理问题

  提交描述:
  修复了在使用OpenAI兼容API时TaskCreate工具调用失败的问题。

  问题:
  - 当使用OpenAI兼容API模型时,调用TaskCreate工具出现"InputValidationError: The required
  parameter `subject` is missing"错误
  - OpenAI兼容层没有正确处理deferred tools的过滤逻辑,导致工具schema没有被正确发送给模型

  修复:
  1. 在OpenAI兼容层中添加了与Anthropic API路径一致的deferred tools处理逻辑
  2. 导入必要的工具搜索相关函数: isToolSearchEnabled, extractDiscoveredToolNames,
  isDeferredTool等
  3. 实现工具过滤逻辑:
     - 检查工具搜索是否启用
     - 构建deferred tools集合
     - 过滤工具列表: 只包含非deferred工具或已发现的deferred工具
     - 为deferred tools设置deferLoading标志
  4. 修正了extractDiscoveredToolNames函数的导入路径错误

  影响:
  - 解决了TaskCreate工具调用时的参数验证错误
  - 确保OpenAI兼容层与Anthropic API路径在处理deferred tools时行为一致
  - 支持工具搜索功能在OpenAI兼容模式下正常工作

  修改的文件:
  - src/services/api/openai/index.ts - 主要修复文件

  测试建议:
  1. 使用OpenAI兼容API模型时,TaskCreate工具应该可以正常调用
  2. 如果工具搜索功能启用,可能需要先使用ToolSearchTool来发现TaskCreate工具
  3. 验证工具调用时不再出现"InputValidationError"错误

  这个修复确保了当使用OpenAI兼容API(如Ollama、DeepSeek、vLLM等)时,deferred
  tools(如TaskCreate)能够被正确处理,解决了工具调用失败的问题。

* fix: 更新工具模式未发送提示,增加OpenAI兼容模型使用指南
2026-04-08 18:08:59 +08:00
bonerush
bdea5a2632
fix: Fix deferred tools handling in OpenAI compatibility layer (#193)
* fix: reorder tool and user messages for OpenAI API compatibility (#168)
Fixes #168
OpenAI requires that an assistant message with tool_calls be immediately
followed by tool messages. Previously, convertInternalUserMessage
output user content before tool results, causing 400 errors.
Now tool messages are pushed first.

* fix: 修复OpenAI兼容层中deferred tools处理问题

  提交描述:
  修复了在使用OpenAI兼容API时TaskCreate工具调用失败的问题。

  问题:
  - 当使用OpenAI兼容API模型时,调用TaskCreate工具出现"InputValidationError: The required
  parameter `subject` is missing"错误
  - OpenAI兼容层没有正确处理deferred tools的过滤逻辑,导致工具schema没有被正确发送给模型

  修复:
  1. 在OpenAI兼容层中添加了与Anthropic API路径一致的deferred tools处理逻辑
  2. 导入必要的工具搜索相关函数: isToolSearchEnabled, extractDiscoveredToolNames,
  isDeferredTool等
  3. 实现工具过滤逻辑:
     - 检查工具搜索是否启用
     - 构建deferred tools集合
     - 过滤工具列表: 只包含非deferred工具或已发现的deferred工具
     - 为deferred tools设置deferLoading标志
  4. 修正了extractDiscoveredToolNames函数的导入路径错误

  影响:
  - 解决了TaskCreate工具调用时的参数验证错误
  - 确保OpenAI兼容层与Anthropic API路径在处理deferred tools时行为一致
  - 支持工具搜索功能在OpenAI兼容模式下正常工作

  修改的文件:
  - src/services/api/openai/index.ts - 主要修复文件

  测试建议:
  1. 使用OpenAI兼容API模型时,TaskCreate工具应该可以正常调用
  2. 如果工具搜索功能启用,可能需要先使用ToolSearchTool来发现TaskCreate工具
  3. 验证工具调用时不再出现"InputValidationError"错误

  这个修复确保了当使用OpenAI兼容API(如Ollama、DeepSeek、vLLM等)时,deferred
  tools(如TaskCreate)能够被正确处理,解决了工具调用失败的问题。
2026-04-08 12:56:10 +08:00
geroge
19a362571b
Merge branch 'claude-code-best:main' into main 2026-04-08 11:31:49 +08:00
HitMargin
3683f22529
补全status界面里的信息 (#189)
* docs: update contributors

* docs: update contributors

* docs: update contributors

* docs: update contributors

* 添加status命令里更多模型api介绍

---------

Co-authored-by: HitMargin <hitmargin@qq.com>
2026-04-08 10:56:46 +08:00
claude-code-best
e86573ac2f fix: 修复 -r 模式下键盘输入无响应
两个根因:

1. earlyInput 的 readableHandler 残留在 stdin 上
   setAppCallbacks() 在反编译项目中从未被调用,导致
   stopCapturingEarlyInput() 是 no-op,readableHandler
   在 Ink 的 handleReadable 之前消费所有 stdin 数据。
   修复:在 handleSetRawMode(true) 时移除非自身的 readable listeners。

2. React 19 layout effect cleanup 顺序问题
   React 19 先运行新树的 layout effects,再清理旧树。
   当旧树(showSetupDialog)比新树(launchResumeChooser)
   有更多 useInput hooks 时,旧树 cleanup 把
   rawModeEnabledCount 降到 0,错误关闭 raw mode。
   修复:当 count=0 但仍有活跃 EventEmitter listeners 时恢复 count。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-07 23:54:09 +08:00
claude-code-best
3e1c6bcc3f Merge branch 'main' into refactor/ink-v2 2026-04-07 22:41:35 +08:00
claude-code-best
d6bfc34b71 fix: 修复 ant 模式 2026-04-07 22:40:59 +08:00
claude-code-best
91b9366f64 refactor: 大规模迁移原有组件到 ink 包内 2026-04-07 22:26:45 +08:00
geroge
66be9ca401
Merge branch 'claude-code-best:main' into main 2026-04-07 20:52:38 +08:00
geroge
a075c09efd
Merge pull request #1 from xixingde/main
strictplan
2026-04-07 20:50:43 +08:00
xixingde
47b535af47 fix(costrict): enable file edit and write tools for built-in agents 2026-04-07 20:40:17 +08:00
Askhz
d77963fb3f feat: add costrict login provider 2026-04-07 20:32:32 +08:00