diff --git a/components/command/CommandPanel.vue b/components/command/CommandPanel.vue index 9dce81a0..03086dbe 100644 --- a/components/command/CommandPanel.vue +++ b/components/command/CommandPanel.vue @@ -60,7 +60,7 @@ const searchResult = $computed(() => { }) const result = $computed(() => commandMode - ? registry.query(scopes.map(s => s.id).join('.'), input.slice(1)) + ? registry.query(scopes.map(s => s.id).join('.'), input.slice(1).trim()) : searchResult, ) @@ -79,13 +79,13 @@ const onCommandActivate = (item: QueryResultItem) => { } else if (item.onComplete) { scopes.push(item.onComplete()) - input = '>' + input = '> ' } } const onCommandComplete = (item: QueryResultItem) => { if (item.onComplete) { scopes.push(item.onComplete()) - input = '>' + input = '> ' } else if (item.onActivate) { item.onActivate() diff --git a/composables/dialog.ts b/composables/dialog.ts index 46f9e08a..ac8f1018 100644 --- a/composables/dialog.ts +++ b/composables/dialog.ts @@ -119,7 +119,7 @@ export function closePreviewHelp() { } export function openCommandPanel(isCommandMode = false) { - commandPanelInput.value = isCommandMode ? '>' : '' + commandPanelInput.value = isCommandMode ? '> ' : '' isCommandPanelOpen.value = true }