summaryrefslogtreecommitdiff
path: root/packages/cli/src/ui/hooks/slashCommandProcessor.ts
diff options
context:
space:
mode:
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,