summaryrefslogtreecommitdiff
path: root/packages/cli/src/ui/hooks/useCompletion.ts
diff options
context:
space:
mode:
authorSeth Troisi <[email protected]>2025-07-01 15:51:43 -0700
committerGitHub <[email protected]>2025-07-01 22:51:43 +0000
commit383306e17ea8bf88c8f7bc24a4873246af3cc983 (patch)
tree5ccffdc893efaefe661e76aba100aa23dbffb883 /packages/cli/src/ui/hooks/useCompletion.ts
parent8957ad7fc377622f9653641c7a349ca70c4ffa44 (diff)
Improve slashCommand autoCompletion logic (#2776)
Diffstat (limited to 'packages/cli/src/ui/hooks/useCompletion.ts')
-rw-r--r--packages/cli/src/ui/hooks/useCompletion.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/packages/cli/src/ui/hooks/useCompletion.ts b/packages/cli/src/ui/hooks/useCompletion.ts
index 8e18e32f..27a1c708 100644
--- a/packages/cli/src/ui/hooks/useCompletion.ts
+++ b/packages/cli/src/ui/hooks/useCompletion.ts
@@ -135,7 +135,8 @@ export function useCompletion(
(cmd) => cmd.name === commandName || cmd.altName === commandName,
);
- if (command && command.completion) {
+ // Continue to show command help until user types past command name.
+ if (command && command.completion && parts.length > 1) {
const fetchAndSetSuggestions = async () => {
setIsLoadingSuggestions(true);
if (command.completion) {