Repository navigation
feat(command): /review 参数解析(repo/mode/focus 不再被忽略) - #40
Merged
Merged
Conversation
The hint promised `repo_path [mode] [focus]`, but the handler never read invocation.rawInput and always reviewed the session cwd. The hint was a lie. parseReviewCommand() now handles positional args (path / mode keyword / remaining text as focus) and key=value pairs (repo=, base=, head=, commit=, focus=, mode=), with commit= implying mode=commit. Unknown ids and empty values are reported back instead of being dropped silently. 19 new tests. Full suite: 491 passed.
Nicholas023
marked this pull request as draft
November 4, 2026 16:04
Nicholas023
marked this pull request as ready for review
November 4, 2026 16:04
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.
问题
/review的命令提示写着repo_path [mode] [focus],但 handler 从来不看invocation.rawInput,永远用会话 cwd 评审。也就是说:提示在骗人。上一版 PR #39 修好了"命令不出现"(契约不符),这一版修"提示与行为不一致"。
做法
新增
parseReviewCommand()(纯函数,可注入存在性判定,19 个测试):/review/review D:/repo/review D:/repo scan/review scan 重点看并发/review D:/r branch base=main head=dev/review commit=abc123mode=commit/review repo=D:/x focus=鉴权判定顺序:先抽
key=value,再按位置认「像路径的」和「模式关键字」,剩下拼成 focus。不静默丢弃:未知 mode、空值都会以
⚠附在回执里。验证
tsc干净本 PR 由 DeepSeek Harness 辅助创建