diff options
| author | Ramón Medrano Llamas <[email protected]> | 2025-07-28 17:46:43 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-07-28 15:46:43 +0000 |
| commit | 0170791800183b81e2afc98f8fb2368219bfb3e3 (patch) | |
| tree | aa413e1c0c608403b2ac0053169ab98dd896e415 /packages/cli/src/ui/commands/configCommand.ts | |
| parent | e2754416516edb8c27e63cee5b249f41c3e0fffc (diff) | |
feat: Add /config refresh command (#4993)
Co-authored-by: Bryan Morgan <[email protected]>
Diffstat (limited to 'packages/cli/src/ui/commands/configCommand.ts')
| -rw-r--r-- | packages/cli/src/ui/commands/configCommand.ts | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/packages/cli/src/ui/commands/configCommand.ts b/packages/cli/src/ui/commands/configCommand.ts new file mode 100644 index 00000000..3651b221 --- /dev/null +++ b/packages/cli/src/ui/commands/configCommand.ts @@ -0,0 +1,33 @@ +/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ + +import { + CommandKind, + SlashCommand, + SlashCommandActionReturn, +} from './types.js'; + +export const configCommand: SlashCommand = { + name: 'config', + description: 'Commands for interacting with the CLI configuration.', + kind: CommandKind.BUILT_IN, + subCommands: [ + { + name: 'refresh', + description: 'Reload settings and extensions from the filesystem.', + kind: CommandKind.BUILT_IN, + action: async (context): Promise<SlashCommandActionReturn> => { + await context.ui.refreshConfig(); + return { + type: 'message', + messageType: 'info', + content: + 'Configuration, extensions, memory, and tools have been refreshed.', + }; + }, + }, + ], +}; |
