diff options
| author | Billy Biggs <[email protected]> | 2025-07-08 12:57:34 -0400 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-07-08 16:57:34 +0000 |
| commit | c0940a194ea002742cb12d88dee9328a0d2da153 (patch) | |
| tree | d4ecc47c3a297aa1c00d6fc42616491614b4bad5 /packages/cli/src/ui/hooks/slashCommandProcessor.ts | |
| parent | f1647d9e19bf6930bc50bd2e66d2929f8f771503 (diff) | |
Add a command line option to enable and list extensions (#3191)
Diffstat (limited to 'packages/cli/src/ui/hooks/slashCommandProcessor.ts')
| -rw-r--r-- | packages/cli/src/ui/hooks/slashCommandProcessor.ts | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/packages/cli/src/ui/hooks/slashCommandProcessor.ts b/packages/cli/src/ui/hooks/slashCommandProcessor.ts index c174b8a4..66cf4e39 100644 --- a/packages/cli/src/ui/hooks/slashCommandProcessor.ts +++ b/packages/cli/src/ui/hooks/slashCommandProcessor.ts @@ -494,6 +494,34 @@ export const useSlashCommandProcessor = ( }, }, { + name: 'extensions', + description: 'list active extensions', + action: async () => { + const activeExtensions = config?.getActiveExtensions(); + if (!activeExtensions || activeExtensions.length === 0) { + addMessage({ + type: MessageType.INFO, + content: 'No active extensions.', + timestamp: new Date(), + }); + return; + } + + let message = 'Active extensions:\n\n'; + for (const ext of activeExtensions) { + message += ` - \u001b[36m${ext.name} (v${ext.version})\u001b[0m\n`; + } + // Make sure to reset any ANSI formatting at the end to prevent it from affecting the terminal + message += '\u001b[0m'; + + addMessage({ + type: MessageType.INFO, + content: message, + timestamp: new Date(), + }); + }, + }, + { name: 'tools', description: 'list available Gemini CLI tools', action: async (_mainCommand, _subCommand, _args) => { |
