summaryrefslogtreecommitdiff
path: root/packages/cli/src/ui/commands/helpCommand.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/commands/helpCommand.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/commands/helpCommand.ts')
-rw-r--r--packages/cli/src/ui/commands/helpCommand.ts16
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());
},
};