diff options
Diffstat (limited to 'packages/cli/src/ui/commands/helpCommand.ts')
| -rw-r--r-- | packages/cli/src/ui/commands/helpCommand.ts | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/packages/cli/src/ui/commands/helpCommand.ts b/packages/cli/src/ui/commands/helpCommand.ts index 03c64615..0b71ce8f 100644 --- a/packages/cli/src/ui/commands/helpCommand.ts +++ b/packages/cli/src/ui/commands/helpCommand.ts @@ -4,18 +4,20 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { CommandKind, OpenDialogActionReturn, SlashCommand } from './types.js'; +import { CommandKind, SlashCommand } from './types.js'; +import { MessageType, type HistoryItemHelp } from '../types.js'; export const helpCommand: SlashCommand = { name: 'help', altNames: ['?'], - description: 'for help on gemini-cli', kind: CommandKind.BUILT_IN, - action: (_context, _args): OpenDialogActionReturn => { - console.debug('Opening help UI ...'); - return { - type: 'dialog', - dialog: 'help', + description: 'for help on gemini-cli', + action: async (context) => { + const helpItem: Omit<HistoryItemHelp, 'id'> = { + type: MessageType.HELP, + timestamp: new Date(), }; + + context.ui.addItem(helpItem, Date.now()); }, }; |
