Skip to content

fix(ce-core): resolve tsc type errors in subagent tools and tests#2

Merged
leing2021 merged 1 commit into
mainfrom
fix/ce-core-tsc-errors
May 24, 2026
Merged

fix(ce-core): resolve tsc type errors in subagent tools and tests#2
leing2021 merged 1 commit into
mainfrom
fix/ce-core-tsc-errors

Conversation

@leing2021
Copy link
Copy Markdown
Owner

变更说明

修复 5 处 bunx tsc --noEmit 类型错误,零功能变更。

根因

类型演进不完整 — 代码从 string 返回值的旧 SubagentRunner 迁移到 SingleResultSubagentLiveRunner,但多处类型定义和测试没有同步。

修复清单

文件 修复
tools/subagent.ts SubagentLiveDetails.mode 添加 "parallel"
tools/parallel-subagent.ts execute 的 runner 参数改为 SubagentLiveRunner | SubagentRunner
index.ts onUpdate 回调桥接、pi.cwd 类型断言、renderCall 类型适配
tests/subagent-events.test.ts unknown 类型断言修复
tests/subagent-live-updates.test.ts SingleResult 导入路径修复

测试

bun test: 285 pass / 0 fail
bunx tsc --noEmit: 零错误

- Add "parallel" to SubagentLiveDetails.mode union type
- Bridge AgentToolUpdateCallback to SubagentLiveDetails in onUpdate
- Accept SubagentRunner alongside SubagentLiveRunner in parallel-subagent
- Fix pi.cwd access and SingleResult import path
- Fix unknown type assertions in subagent-events tests
@leing2021 leing2021 merged commit 881fbd0 into main May 24, 2026
1 of 2 checks passed
@leing2021 leing2021 deleted the fix/ce-core-tsc-errors branch May 24, 2026 03:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant