zbc
2e6dd38603
启动时自动创建raw-dump目录
2026-05-27 16:11:14 +08:00
zbc
14d8e59d8c
1. 增加统计信息并上报逻辑,用于对账;2. 上报失败超过最大重试次数的消息记录到dead letter jsonl中
2026-05-27 10:49:21 +08:00
zbc
455489cc89
1. 修改上报队列机制,确保上报失败有可靠的重试机制,不会静默失败;2.修改conversation上报遗漏的问题;
2026-05-27 09:48:38 +08:00
zbc
c8586ee6ee
1. 修复匿名上报url错误; 2.增加注释; 3.增加异常场景处理提升获取对话diff的健壮性“
2026-05-26 16:39:19 +08:00
zbc
7ae2c9ba08
修复LLM response中构建diff不完善的问题
2026-05-25 19:13:47 +08:00
linkai0924
9cded24692
Merge pull request #143 from y574444354/feat/hub-tabbed-ui
...
feat: refactor /hub command to tabbed interface
2026-05-21 23:59:50 +08:00
林凯90331
1a2369df8a
feat: refactor /hub command to tabbed interface with category tabs
...
- Replace single Dialog with Pane + Tabs (Skills/Agents/Commands/MCP)
- Add search box activated by '/' key
- Display score with k-formatting (e.g. 1.5k) and source label
- Add cloud subscription hint with store URL at top
- Add space/enter toggle hint at bottom
- Support experienceScore field with fallback to score/favoriteCount
- Remove All tab, default to Skills
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-21 23:56:25 +08:00
Askhz
efe7cfdb33
feat: add memory cloud sync to costrict-web API
...
Auto-memory files are now synced to the cloud via /api/memories endpoint.
On startup, a full scan uploads new/changed files. A file watcher handles
incremental changes with 10s debounce. A process lock ensures only one
watcher per project. Disabled via DISABLE_MEMORY_CLOUD_SYNC=1.
Co-Authored-By: CoStrict-DeepSeek-V4-Pro <deepseek-ai@claude-code-best.win>
2026-05-21 19:31:17 +08:00
Askhz
c63efd77a6
feat: add new standalone auto-update mechanism
...
Reference CS (opencode) design: startup one-shot version check,
silent patch auto-install via npm, minor/major notify only.
Does not modify any existing auto-update code.
Co-Authored-By: CoStrict-DeepSeek-V4-Pro <deepseek-ai@claude-code-best.win>
2026-05-21 14:16:26 +08:00
Askhz
eded375fb4
Merge pull request #137 from IronRookieCoder/fix/costrict-native-tool-bad-json
...
fix(costrict): recover task updates from missing tool calls
2026-05-20 17:19:51 +08:00
DoSun
553bf671ef
perf: optimize cs-cloud spawn performance and remove debug logging
...
Optimized the spawn call to match direct cs-cloud execution performance:
- Use process.env directly instead of spreading (avoids unnecessary copy)
- Explicitly disable shell to avoid overhead
- Removed debug timestamp logging for cleaner output
The spawn performance now matches direct cs-cloud binary execution.
Co-Authored-By: claude-sonnet-4-6 <noreply@anthropic.com>
2026-05-20 17:03:35 +08:00
DoSun
9afae554eb
refactor: change execution log from debug to info level
...
Changed the command execution logging from stderr debug message to stdout info message for better user experience.
- console.error -> console.log
- Removed [DEBUG] prefix
- Cleaner "Executing:" format
Co-Authored-By: claude-sonnet-4-6 <noreply@anthropic.com>
2026-05-20 14:15:08 +08:00
DoSun
6901484dd7
feat: add command execution logging for debugging
...
Added debug logging to print the exact cs-cloud command being executed.
This helps verify that arguments are passed correctly when debugging cloud hang issues.
Co-Authored-By: claude-sonnet-4-6 <noreply@anthropic.com>
2026-05-20 14:13:52 +08:00
DoSun
b6e9b1ba4e
fix: prevent Linux csc cloud commands from hanging
...
Fixed the root cause of Linux csc cloud commands hanging by addressing spawn() call issues, not network/permission problems:
- Changed stdio from "inherit" to ["ignore", "inherit", "inherit"] to close stdin and prevent blocking
- Removed duplicate ensureCsCloud() call that was unnecessary since runCsCloud already calls it
- Added disconnect event handler for better error handling
- Added explicit detached: false option
The real issue was that stdin inheritance caused the spawn call to block on Linux, even when the cs-cloud binary already existed and worked fine when called directly.
Co-Authored-By: claude-sonnet-4-6 <noreply@anthropic.com>
2026-05-20 14:11:30 +08:00
IronRookieCoder
4cb047ff48
fix(costrict): recover task updates from missing tool calls
...
## Bug 详情
CSC 在相同模型和输入下,任务流程可能先成功执行 TaskCreate,随后模型返回 stop_reason=tool_use 但没有实际 tool_use block,导致 TaskUpdate/update_todo_list 没有执行,最终任务状态更新失败。
## 根因
CoStrict/OpenAI 兼容流在工具参数不完整或模型续轮缺少工具块时,缺少稳定的结构化恢复路径;query 层原先无法基于已发生的任务工具调用链路区分普通缺失工具调用和任务状态更新流程。
## 修复方案
基于结构化 tool_use 历史识别任务流程,优先引导 CoStrict 使用 update_todo_list 恢复任务清单状态;同时为 CoStrict 工具 JSON 流增加无效参数保留和错误结果回传,避免执行 malformed tool input。
## 变更要点
- 新增 update_todo_list 兼容工具,并注册到 TaskV2 工具列表
- query 缺失 tool_use 恢复改为基于 TaskCreate/TaskUpdate/TaskList/TaskGet/update_todo_list 结构化工具历史判断
- CoStrict provider 保留 malformed tool call 的 id/name 并阻止执行无效参数
- 工具执行和 streaming executor 对 invalid tool call 返回错误 tool_result
- 补充 query 恢复、CoStrict provider、工具执行、消息规范化和 update_todo_list 单测
## 自测
- bun test src/__tests__/queryMissingToolUseRecovery.test.ts
- bun test src/costrict/provider/index.test.ts
- bun test src/utils/__tests__/messages.test.ts
- bun test src/services/tools/__tests__/StreamingToolExecutor.test.ts packages/builtin-tools/src/tools/UpdateTodoListCompatTool/__tests__/UpdateTodoListCompatTool.test.ts
- bun run typecheck 仍有当前工作区既有无关错误,未由本次修改引入
2026-05-20 13:44:12 +08:00
DoSun
c63d8c60ce
perf: optimize subagent transcript lookup with cache, meta-based resolution and startup index
2026-05-20 11:22:26 +08:00
DoSun
c5a3142dfe
fix: default tool_use status to completed in transcript decompose
2026-05-20 11:22:25 +08:00
DoSun
bd968b8266
feat: messages API returns parts with accurate running status for active subagents
2026-05-20 11:22:25 +08:00
DoSun
a7a00a1a26
fix: use callID matching for task progress part updates
...
Remove mainPartID/mainMessageID from SubagentToolState. Emit
message.part.updated with random id and callID for task progress,
so consumer can match by callID when part IDs differ after tab switch.
2026-05-20 11:22:23 +08:00
DoSun
07f6ebe004
fix: normalize tool names and remove metadata.sessionId from running/completed events
...
- Apply normalizeToolName consistently in all tool_result paths (wasStreamed=true and wasStreamed=false)
- Remove metadata.sessionId from running state in streamStateTracker content_block_stop
- Remove metadata.sessionId from emitTaskProgress and emitTaskCompleted
- Add streamStateTracker.ts with stream-to-opencode event conversion
- Add subagent task lifecycle events (started/progress/completed)
- Handle tombstone, attachment, progress message types
2026-05-20 11:22:22 +08:00
linkai0924
9481d58c2b
Merge pull request #131 from Askhz/fix/ctrl-enter-newline
...
fix: 修复 Ctrl+Enter 在标准终端中应插入换行而非发送消息
2026-05-19 20:50:33 +08:00
linkai0924
6e8bb0f72d
Merge pull request #135 from Askhz/feat/costrict-cheapest-model-for-haiku-tasks
...
feat(costrict): use cheapest model by creditConsumption for haiku-tier auxiliary tasks
2026-05-19 20:46:40 +08:00
Askhz
0aa86c9f84
feat(costrict): use cheapest model by creditConsumption for haiku-tier auxiliary tasks
...
All auxiliary requests (session memory, extract memories, side queries,
forked agents) now resolve to the model with the lowest creditConsumption
from the /v1/models list when using the CoStrict provider, instead of
falling back to the main conversation model.
- Add getCheapestCoStrictModel() to select cheapest model from cached list
- Resolve haiku-family models to cheapest model in resolveCoStrictModel
- Change getSmallFastModel() for CoStrict to return haiku alias
- Fix sideQuery() to respect opts.model with known-model validation
- Override mainLoopModel in SessionMemory and extractMemories forked agents
- Use getSmallFastModel() for findRelevantMemories under CoStrict
Co-Authored-By: CoStrict-DeepSeek-V4-Pro <deepseek-ai@claude-code-best.win>
2026-05-19 19:13:49 +08:00
林凯90331
9093d20fcf
fix: favorite list route should respect type query parameter
...
The /global/favorite/skills GET route was hardcoded to list only
skill-type favorites, causing cloud hub to show Cloud status for
non-skill favorites (agent, command, mcp) even after they were
loaded locally.
Now it reads the optional type query parameter and passes it to
listFavoriteItems, matching the opencode server behavior.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-19 17:57:38 +08:00
Askhz
728af38c52
fix: 修复 Ctrl+Enter 在标准终端中应插入换行而非发送消息
...
- parse-keypress.ts: \n (LF) 字节标记为 ctrl=true,因为标准终端中
Ctrl+Enter 发送 \n,需与普通 Enter (\r) 区分
- defaultBindings.ts: 新增 ctrl+enter -> chat:newline 快捷键绑定,
支持 Kitty 键盘协议终端(如 Windows Terminal 1.25+)
Co-Authored-By: Sonnet-4.6-CoStrict <noreply@anthropic.com>
2026-05-19 16:16:24 +08:00
linkai0924
0574a8e00e
Merge pull request #128 from Askhz/fix/lsp-windows-spawn-shell
...
fix: 修复 Windows 上 LSP 服务器启动 ENOENT 错误
2026-05-19 11:59:49 +08:00
IronRookieCoder
b36e8e4ff2
fix(costrict): handle image input for model compatibility
...
## Bug 详情
CoStrict 在读取图片后会把图片放在 tool_result.content 中,OpenAI 兼容层只保留文本,导致模型没有收到真实图片内容。
非多模态模型收到图片请求时,后端会返回底层 400 错误,例如 not a multimodal model。
## 根因
OpenAI 消息转换逻辑没有处理 tool_result 中嵌套的 image block。
CoStrict 查询路径没有在发送请求前检查模型的图片输入能力,也没有归一化非多模态模型错误。
## 修复方案
将 tool_result 中的图片转换为后续 user 多模态消息,确保兼容层能传递 image_url。
在 CoStrict 模型元数据明确声明 supportsImages=false 时,提前返回英文错误提示;同时对后端非多模态错误做英文提示归一化。
## 变更要点
- Preserve image blocks nested in tool_result for OpenAI-compatible providers
- Add CoStrict image-capability gate based on supportsImages metadata
- Normalize non-multimodal backend errors to a clear English message
- Add regression tests for nested tool_result images and non-multimodal model handling
## 自测
- bun test src/costrict/provider/index.test.ts
- bun test packages/@ant/model-provider/src/shared/__tests__/openaiConvertMessages.test.ts
2026-05-19 11:38:16 +08:00
linkai0924
b7153a12a7
Merge pull request #127 from IronRookieCoder/fix/yaml-frontmatter-node-polyfill
...
fix(yaml): guard Bun YAML parser availability
2026-05-19 09:50:50 +08:00
Askhz
8dfd1ddc0b
fix: 修复 Windows 上 LSP 服务器启动 ENOENT 错误
...
Windows 的 spawn() 使用 CreateProcess API,只能直接执行 PE 可执行文件
(.exe/.com),无法解析 npm 全局安装产生的 .cmd 包装脚本。启用 shell 选项
后由 cmd.exe 解析脚本路径,解决 typescript-language-server 等 LSP 服务器
在 Windows 上找不到命令的问题。
Co-Authored-By: Auto <noreply@anthropic.com>
2026-05-19 09:32:07 +08:00
IronRookieCoder
a506e933a9
fix(yaml): guard Bun YAML parser availability
...
## Bug 详情
Windows 下通过 npm shim 执行 csc 时,/agents 只显示 built-in agents,User agents 和 Project agents 未加载;debug 日志中 agents 和 skills 的 frontmatter 均报 Cannot read properties of undefined (reading 'parse')。
## 根因
csc.cmd 实际通过 Node 执行 dist/cli-node.js。Node 入口注入了 globalThis.Bun polyfill,但该 polyfill 不包含 Bun.YAML。parseYaml 只判断 Bun 对象存在,导致误调用 Bun.YAML.parse。
## 修复方案
将 Bun 分支改为能力检测,仅在 Bun.YAML.parse 存在时使用 Bun 内置 YAML 解析器,否则回退到 yaml npm 包。
## 变更要点
- 为 parseYaml 增加 Bun.YAML.parse 可用性判断
- 保持真实 Bun runtime 使用 Bun.YAML.parse
- 保持 Node 入口使用 require('yaml').parse 回退
## 自测
- bun 下验证 parseYaml 可解析基础 frontmatter
- Node 下验证 yaml 包可解析基础 frontmatter
- bun run typecheck 已运行,但失败于仓库既有无关类型错误
2026-05-18 20:45:56 +08:00
林凯90331
ad90f40088
feat(rawDump): add parent_ids to commit payload
...
Include parent commit hashes in raw dump commit reporting.
- git log format now includes %P (parent hashes)
- parseCommitLog extracts parent_ids as string array
- CommitPayload type extended with parent_ids field
- merge commits may have multiple parents
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-18 20:06:15 +08:00
linkai0924
70b5e285aa
Merge pull request #124 from IronRookieCoder/fix/git-bash-raw-mode
...
Fix/git bash raw mode
2026-05-18 19:15:14 +08:00
linkai0924
e901c66cd1
Merge pull request #122 from IronRookieCoder/fix/task-exception-status-hint
...
Fix/task exception status hint
2026-05-18 19:09:34 +08:00
IronRookieCoder
61610d08cd
fix(openai): reject invalid streamed tool arguments
...
## Bug 详情
OpenAI 兼容流返回工具调用时,模型可能输出无法解析为 JSON object 的 arguments,例如 TaskUpdate 参数片段最终拼成非法 JSON。此前这类返回会被任务工具宽松修复或降级为 {},用户看不到模型返回不合法,工具也可能进入错误执行路径。
## 根因
normalizeContentFromAPI 在解析 tool_use.input 失败后会尝试 repairTaskToolInput,并在无法修复时回退为空对象;OpenAI 组装层没有把非法工具调用转换成用户可见提示。
## 修复方案
将工具调用参数作为模型边界输入严格校验:最终工具名必须存在,工具参数必须解析为 JSON object。非法响应抛出 InvalidToolCallResponseError,并在 OpenAI 组装层转换为普通英文 assistant 提示,工具不再执行。
## 变更要点
- 移除任务工具参数的宽松修复和 {} 降级逻辑
- 新增非法工具调用参数和缺失工具名的显式错误
- OpenAI 组装层捕获非法工具调用并显示普通英文提示
- 增加流式分片省略 name 时保留初始工具名的测试
## 自测
- bun test src/utils/__tests__/messages.test.ts
- bun test packages/@ant/model-provider/src/shared/__tests__/openaiStreamAdapter.test.ts
- git diff --check
- bun run typecheck 仍失败,失败项为仓库既有类型问题,未涉及本次改动文件
2026-05-18 17:59:13 +08:00
linkai0924
c9ce63e7d4
Merge pull request #125 from y574444354/fix/favorite-status-priority
...
fix: cloud favorite status priority and runtime lifecycle
2026-05-18 17:38:50 +08:00
林凯90331
02ffda9d4c
fix: cloud favorite status priority and runtime lifecycle
...
- deriveStatus: prioritize favorite lifecycle over local config presence
- autoEnableCloudFavorites: skip unloaded items to prevent re-loading
- load/unload: sync agent/command favorites to ~/.claude/{agents,commands}/
- /hub toggle: trigger MCP reconnection and agent definition refresh
- cloud-enabled menu: trigger load for newly checked items
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-18 17:38:10 +08:00
IronRookieCoder
7b3260e757
fix(ink): restore Git Bash raw input handling
...
## Bug 详情
Windows Git Bash 终端下,csc 4.1.x 的 REPL 输入异常:回车需要按两次,方向键无法选择历史对话,输入 / 无法正常显示或触发命令。
## 根因
Windows raw mode 风险判断将 Git for Windows 的 MINGW64/MINGW32 与 MSYS2/Cygwin/mintty 环境一并禁用 raw mode,导致 Git Bash 走 cooked input fallback,Ink 无法按预期解析 Enter、方向键和 slash 输入。
## 修复方案
将 Git for Windows 的 MINGW64/MINGW32 从 raw mode 不安全名单中排除,恢复 Git Bash 的 raw mode 输入处理,同时保留 MSYS/UCRT/CLANG/Cygwin 和显式禁用开关的保护路径。
## 变更要点
- 调整 Ink raw mode 风险检测,Git Bash 保持 raw mode
- 同步启动早期输入捕获的 Git Bash raw mode 判断
- 增加 Git Bash raw mode 回归测试,并保留 MSYS2/Cygwin 场景覆盖
## 自测
- bun test packages/@ant/ink/src/core/__tests__/raw-mode-support.test.ts src/utils/__tests__/earlyInput.test.ts
- git diff --check
- bun run typecheck(失败,失败点为仓库既有 Zod 类型、缺失声明、MACRO.COMMIT、AppState 等错误,不涉及本次修改文件)
2026-05-18 17:13:17 +08:00
geroge
99f99b74e8
Merge pull request #120 from IronRookieCoder/personal/plugin-auto-update-config
...
fix(plugin): make marketplace auto-update configurable by default
2026-05-18 16:43:08 +08:00
IronRookieCoder
416e2767ed
fix(query): surface missing task tool call failures
...
## Bug 详情
GLM-5 返回 `stop_reason=tool_use` 但没有携带真实任务工具调用时,任务列表流程会停在“准备查看/更新任务”的文本状态,用户无法判断任务是卡住还是已结束。
## 根因
原有缺失工具调用恢复逻辑会尝试追加一次隐式恢复提示;任务相关场景下如果模型没有发出 `TaskList`、`TaskUpdate` 等实际工具调用,缺少用户可见的失败提示。
## 修复方案
对任务相关的缺失工具调用直接输出英文错误,并保留普通缺失工具调用的一次恢复机会;同时把合成缺失工具结果占位改为明确英文失败文案。
## 变更要点
- 新增任务相关 `stop_reason=tool_use` 但无工具调用的检测和失败返回
- 新增通用缺失工具调用恢复失败时的英文错误提示
- 将合成缺失工具结果文案从内部占位改为用户可理解的失败说明
- 增加 query 缺失工具调用恢复路径测试
## 自测
- `bun test src/__tests__/queryMissingToolUseRecovery.test.ts`
- `bun test src/utils/__tests__/messages.test.ts`
- `bun run typecheck` 未完全通过,剩余错误来自仓库既有问题;本次修改相关文件无 TypeScript 错误
2026-05-18 14:50:56 +08:00
IronRookieCoder
3a463313ea
fix(plugin): make marketplace auto-update configurable by default
...
## Bug 详情
/plugin marketplace 中的 Enable/Disable auto-update 会继承 CLI binary auto-updater 的禁用状态。在 CSC 默认关闭 CLI auto-updater 的场景下,plugin marketplace 的自动更新配置入口不可见,用户无法按 marketplace 配置 autoUpdate。
## 根因
shouldSkipPluginAutoupdate() 复用了 isAutoUpdaterDisabled(),导致 ENABLE_AUTOUPDATER、/config channel、development build、nonessential traffic 等 CLI updater 门禁同时影响 plugin marketplace 自动更新。
## 修复方案
将 plugin marketplace auto-update 门禁收敛为 DISABLE_AUTOUPDATER 和 FORCE_AUTOUPDATE_PLUGINS:默认不跳过 plugin auto-update;DISABLE_AUTOUPDATER 显式关闭;FORCE_AUTOUPDATE_PLUGINS 可覆盖关闭状态。
## 变更要点
- 调整 shouldSkipPluginAutoupdate(),使 plugin auto-update 独立于 CLI binary updater 配置
- 新增 plugin autoupdate 门禁单元测试
- 补充 plugin auto-update 机制文档,记录 UI、配置优先级和环境变量行为
## 自测
- bun test src/utils/__tests__/pluginAutoupdateConfig.test.ts
- bun test src/utils/settings/__tests__/config.test.ts
- bun run typecheck 仍失败,失败项为仓库既有 Zod 类型、缺声明和依赖类型问题,非本次变更引入
2026-05-16 16:58:20 +08:00
geroge
7178eac204
Merge pull request #116 from IronRookieCoder/fix/tasks-tool-arguments-repair
...
Fix/tasks tool arguments repair
2026-05-16 10:59:25 +08:00
geroge
d042115b6a
Merge pull request #115 from IronRookieCoder/fix-exit-terminal-state
...
Fix exit terminal state
2026-05-16 10:59:03 +08:00
IronRookieCoder
aaeb662bee
fix(agents): reload empty agent definitions in menu
...
## Bug 详情
生产构建后执行交互式 /agents 时,菜单可能从 AppState 读到空的 agentDefinitions,导致显示 No agents found;同一环境下 bun run dev 可以正常显示 agents。
## 根因
生产 bundle 中底层 agent loader 和内置 agents 均可用,但 /agents 动态菜单只消费启动时注入的 AppState.agentDefinitions。构建产物复现时该状态可能为空,菜单没有现场刷新兜底。
## 修复方案
在 AgentsMenu 打开时检测 allAgents 和 activeAgents 是否同时为空;为空时基于当前 cwd 调用 getAgentDefinitionsWithOverrides 重新加载并写回 AppState,正常已有 agents 的路径直接跳过。
## 变更要点
- 为 AgentsMenu 增加空 agentDefinitions 的 fallback reload
- 使用取消标记避免组件卸载后继续写状态
- 保持现有编辑、删除和正常 dev 路径不变
## 自测
- bun run build
- ./dist/cli-bun.js agents 可列出 27 active agents
- bun run typecheck 仍存在仓库既有类型错误,未新增 AgentsMenu 相关错误
2026-05-16 10:48:31 +08:00
林凯90331
5bfaeb21bd
fix(favorite): ensure /hub enabled skills appear in command list immediately
...
Replace incomplete clearSkillCaches() with clearCommandsCache() so the
loadAllCommands memoize layer is also busted when a cloud favorite skill is
enabled or disabled via /hub.
Add skillChangeDetector.notify() to trigger an immediate REPL command list
refresh instead of waiting for the file watcher to detect the change.
Signed-off-by: 林凯90331 <90331@sangfor.com>
Co-authored-by: CoStrict <zgsm@sangfor.com.cn>
2026-05-15 22:46:03 +08:00
IronRookieCoder
1b8e022522
fix(openai): recover missing streamed tool calls
...
## Bug 详情
OpenAI 兼容流在部分工具调用场景下会出现累计参数片段、复用 tool_calls index 或结束原因为 tool_calls 但缺少 tool_use 块,导致后续 TaskUpdate 等工具调用丢失或参数解析失败。
## 根因
OpenAI stream adapter 直接透传参数片段,无法区分累计快照和增量片段;同一 tool_calls index 被后端复用时也没有重开 tool_use 块。Task 工具参数 JSON 解析失败后统一退回空对象,query 主循环也没有对 stop_reason=tool_use 但无 tool_use 块的响应做恢复。
## 修复方案
在 OpenAI stream adapter 中去重累计参数并处理工具身份变化;仅对 Task 工具做窄范围参数修复,避免将无效 TaskUpdate 修复成 no-op;query 主循环发现缺失 tool_use 块时追加一次元消息让模型补发工具调用。
## 变更要点
- 修复 OpenAI 工具流参数快照去重和 tool_calls index 复用处理
- 增加 TaskCreate/TaskGet/TaskList/TaskUpdate 的解析失败窄范围容错
- 阻止无效 TaskUpdate status 或仅 taskId 输入被修复成空更新
- 增加缺失 tool_use 块的一次性 query recovery transition
- 补充 stream adapter、Task 参数修复和 query recovery 回归测试
## 自测
- bun test packages/@ant/model-provider/src/shared/__tests__/openaiStreamAdapter.test.ts src/utils/__tests__/messages.test.ts src/__tests__/queryMissingToolUseRecovery.test.ts
- bun run typecheck 当前仍失败,错误位于既有未改动文件。
2026-05-15 21:19:04 +08:00
IronRookieCoder
4aa15ac52a
fix(terminal): clear Ink UI on REPL shutdown
...
## Bug 详情
使用 /exit 退出交互式 REPL 后,终端可能保留提示输入、命令补全或其他 Ink 临时 UI,导致 shell prompt 与旧 UI 重叠,出现光标和显示异常。
## 根因
shutdown 路径会恢复 raw mode、bracketed paste、focus reporting 等终端模式,但普通主屏幕 REPL 不会清理 Ink 当前占用的可见区域。进程退出前 React 也不一定能完成 /exit 输入清空后的重新渲染。
## 修复方案
在 Ink 实例中增加主屏幕 shutdown 清理方法,根据最后一帧和声明光标位置清除 Ink 占用区域;gracefulShutdown 在非 alternate-screen 场景调用该方法,alternate-screen 继续保留原有退出逻辑。
## 变更要点
- 新增 ERASE_TO_END_SCREEN CSI 常量用于从当前光标位置清到屏幕底部
- 增加 Ink.clearMainScreenForShutdown() 统一计算并清理主屏幕 REPL 区域
- 在 gracefulShutdown 的终端清理阶段区分 alternate-screen 和主屏幕 Ink 实例
## 自测
- 已运行局部 Biome 检查:bunx biome check packages/@ant/ink/src/core/ink.tsx packages/@ant/ink/src/core/termio/csi.ts src/utils/gracefulShutdown.ts
- 已通过 Bun 直接导入验证新增 Ink 方法和 gracefulShutdown 模块可解析
- 全量 typecheck/build 当前被既有无关问题阻断:ctx_viz/LogoV2/doubaoSTT 类型错误,以及 generate-review-builtin 访问 git@github.com:zgsm-ai/costrict-review.git 失败
2026-05-15 19:03:35 +08:00
DoSun
754157fd88
Merge pull request #114 from Askhz/fix/thinking-model-duplicate-response
...
fix(serve): skip thinking-only message fragments to prevent duplicate response in cs-cloud
2026-05-15 18:12:58 +08:00
Askhz
02899ce69f
fix(serve): skip thinking-only message fragments to prevent duplicate response in cs-cloud
...
normalizeMessages() splits a multi-block AssistantMessage (e.g. [thinking,
text]) into one message per content block. When serve mode emits both the
thinking-only fragment and the text message as separate session.message events,
cs-cloud's adaptMessageEvent creates two assistant messages (one via the
streaming path, one via the non-streaming path), causing the response to appear
twice in the UI.
Fix: skip thinking-only normalized messages in normalizeMessage(), since the
thinking content is already rendered via the stream_event path.
Co-Authored-By: claude-sonnet-4-6 <noreply@anthropic.com>
2026-05-15 17:58:53 +08:00
linkai0924
81b8abc9e3
Merge pull request #84 from IronRookieCoder/fix/issue-34-agent-team-idle
...
fix(agent-team): handle idle teammate coordination failures
2026-05-15 17:01:46 +08:00
linkai0924
0b271a7847
Merge pull request #86 from IronRookieCoder/fix-snip-tool
...
fix(builtin-tools): handle undefined message_ids in SnipTool.call()
2026-05-15 17:01:26 +08:00