-
Notifications
You must be signed in to change notification settings - Fork 2.7k
fix(cli): complete repeated skill slash commands #7720
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
wenshao
merged 11 commits into
QwenLM:main
from
Sparkle6979:fix-skill-completion-multiple
Jul 26, 2026
+563
−43
Merged
Changes from 3 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
d4c608f
fix(cli): complete repeated skill slash commands
Sparkle6979 f10d14c
fix(cli): scope stacked skill completion
Sparkle6979 6a80ac0
fix(cli): suppress invalid stacked skill ghost text
Sparkle6979 e4855cf
refactor(cli): centralize stacked skill eligibility
Sparkle6979 283f4a9
Merge branch 'main' into fix-skill-completion-multiple
Sparkle6979 06a376d
fix(cli): align stacked skill highlighting
Sparkle6979 4543bf0
Merge branch 'main' into fix-skill-completion-multiple
Sparkle6979 60ffa30
Merge branch 'main' into fix-skill-completion-multiple
wenshao 26e74c3
test(cli): cover stacked skill completion guards
Sparkle6979 326bb15
Merge branch 'main' into fix-skill-completion-multiple
Sparkle6979 b7b7c82
Merge branch 'main' into fix-skill-completion-multiple
Sparkle6979 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Suggestion] Duplicated predicate — the three-condition check here (
kind === SKILL && userInvocable !== false && !hidden) is duplicated inline insideisValidStackedSkillPrefixatcommands.ts:46-50. Both answer the same question but live in different modules.Failure scenario: if a maintainer adds a fourth condition (e.g.
cmd.deprecated) to one site without discovering the other, the dropdown would offer commands the prefix validator rejects — silent no-op completions.Concrete fix: export this predicate from
commandUtils.ts(alongside the existingisMidInputCompletableCommand), then import it in bothuseCommandCompletion.tsxandcommands.ts.中文说明
[Suggestion] 重复的判断条件 —— 此处的三条件检查在
commands.ts:46-50的isValidStackedSkillPrefix中被内联重复。两者回答同一个问题,却分处不同模块。失败场景:如果维护者向其中一个位置添加了第四个条件(例如
cmd.deprecated),而未发现另一个,则下拉菜单会提供前缀验证器会拒绝的命令 —— 产生静默的无效补全。建议修复:将此谓函数导出到
commandUtils.ts(与现有的isMidInputCompletableCommand并列),然后在useCommandCompletion.tsx和commands.ts中导入它。— qwen3.7-max via Qwen Code /review
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in e4855cf. I kept the shared predicate in src/utils/commands.ts so the lower-level command utility does not depend on ui/utils. Both call sites now use it.