2025-07-07 16:45:44 -04:00
|
|
|
/**
|
|
|
|
|
* @license
|
|
|
|
|
* Copyright 2025 Google LLC
|
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
*/
|
|
|
|
|
|
2025-08-26 00:04:53 +02:00
|
|
|
import type { SlashCommand } from './types.js';
|
|
|
|
|
import { CommandKind } from './types.js';
|
2025-08-04 09:53:50 -07:00
|
|
|
import { MessageType, type HistoryItemHelp } from '../types.js';
|
2025-07-07 16:45:44 -04:00
|
|
|
|
|
|
|
|
export const helpCommand: SlashCommand = {
|
|
|
|
|
name: 'help',
|
2025-07-20 16:57:34 -04:00
|
|
|
altNames: ['?'],
|
|
|
|
|
kind: CommandKind.BUILT_IN,
|
2025-10-17 13:20:15 -07:00
|
|
|
description: 'For help on gemini-cli',
|
2025-08-04 09:53:50 -07:00
|
|
|
action: async (context) => {
|
|
|
|
|
const helpItem: Omit<HistoryItemHelp, 'id'> = {
|
|
|
|
|
type: MessageType.HELP,
|
|
|
|
|
timestamp: new Date(),
|
2025-07-07 16:45:44 -04:00
|
|
|
};
|
2025-08-04 09:53:50 -07:00
|
|
|
|
|
|
|
|
context.ui.addItem(helpItem, Date.now());
|
2025-07-07 16:45:44 -04:00
|
|
|
},
|
|
|
|
|
};
|