fix: idle 时 /stop 不再误报「未找到 skill」#38
Open
1359484419 wants to merge 1 commit into
Open
Conversation
idle 状态下发 /stop 会落到 handleUnknown,回复「未找到 skill: stop」, 让用户误以为命令不存在。 - 新增 handleStop:空闲时友好提示「当前没有正在进行的任务」 - router 增加 stop case 分发 - 处理中的 /stop 仍由 main.ts 的 handlePriorityCommand 优先拦截 abort(行为不变)
7efc958 to
b7d15e2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题
空闲(idle)状态下发送
/stop,命令会落到handleUnknown,回复「未找到 skill: stop」,让用户误以为该命令不存在。根因:
/stop只在main.ts的handlePriorityCommand里处理,且要求session.state === 'processing';router.ts的 switch 中没有stop这个 case,于是 idle 时走到了 default 分支。改动
handleStop:空闲时友好提示「当前没有正在进行的任务」router.ts增加stopcase 分发/stop仍由handlePriorityCommand优先拦截 abort + 清空队列,行为不变验证
npm run build(tsc)通过routeCommand:idle → 「当前没有正在进行的任务」;processing → 「正在停止当前任务…」