summaryrefslogtreecommitdiff
path: root/packages/cli/src/ui/hooks/slashCommandProcessor.ts
diff options
context:
space:
mode:
authorPyush Sinha <[email protected]>2025-08-04 09:53:50 -0700
committerGitHub <[email protected]>2025-08-04 16:53:50 +0000
commite506b40c271da0e05a361f5299c37976a9e1f1f3 (patch)
tree2d569bd9a86734778f89e0197716e1b5db2954aa /packages/cli/src/ui/hooks/slashCommandProcessor.ts
parent83a04c47552c1407662a5e3e567f4c5e50bba5de (diff)
fix: /help remove flickering and respect clear shortcut (ctr+l) (#3611)
Co-authored-by: Jacob Richman <[email protected]> Co-authored-by: Allen Hutchison <[email protected]>
Diffstat (limited to 'packages/cli/src/ui/hooks/slashCommandProcessor.ts')
-rw-r--r--packages/cli/src/ui/hooks/slashCommandProcessor.ts11
1 files changed, 5 insertions, 6 deletions
diff --git a/packages/cli/src/ui/hooks/slashCommandProcessor.ts b/packages/cli/src/ui/hooks/slashCommandProcessor.ts
index a2a1837d..6d9f4643 100644
--- a/packages/cli/src/ui/hooks/slashCommandProcessor.ts
+++ b/packages/cli/src/ui/hooks/slashCommandProcessor.ts
@@ -42,7 +42,6 @@ export const useSlashCommandProcessor = (
clearItems: UseHistoryManagerReturn['clearItems'],
loadHistory: UseHistoryManagerReturn['loadHistory'],
refreshStatic: () => void,
- setShowHelp: React.Dispatch<React.SetStateAction<boolean>>,
onDebugMessage: (message: string) => void,
openThemeDialog: () => void,
openAuthDialog: () => void,
@@ -105,6 +104,11 @@ export const useSlashCommandProcessor = (
selectedAuthType: message.selectedAuthType,
gcpProject: message.gcpProject,
};
+ } else if (message.type === MessageType.HELP) {
+ historyItemContent = {
+ type: 'help',
+ timestamp: message.timestamp,
+ };
} else if (message.type === MessageType.STATS) {
historyItemContent = {
type: 'stats',
@@ -138,7 +142,6 @@ export const useSlashCommandProcessor = (
},
[addItem],
);
-
const commandContext = useMemo(
(): CommandContext => ({
services: {
@@ -333,9 +336,6 @@ export const useSlashCommandProcessor = (
return { type: 'handled' };
case 'dialog':
switch (result.dialog) {
- case 'help':
- setShowHelp(true);
- return { type: 'handled' };
case 'auth':
openAuthDialog();
return { type: 'handled' };
@@ -462,7 +462,6 @@ export const useSlashCommandProcessor = (
[
config,
addItem,
- setShowHelp,
openAuthDialog,
commands,
commandContext,