summaryrefslogtreecommitdiff
path: root/packages/cli/src/ui/commands/configCommand.ts
diff options
context:
space:
mode:
authorRamón Medrano Llamas <[email protected]>2025-07-28 17:46:43 +0200
committerGitHub <[email protected]>2025-07-28 15:46:43 +0000
commit0170791800183b81e2afc98f8fb2368219bfb3e3 (patch)
treeaa413e1c0c608403b2ac0053169ab98dd896e415 /packages/cli/src/ui/commands/configCommand.ts
parente2754416516edb8c27e63cee5b249f41c3e0fffc (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.ts33
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.',
+ };
+ },
+ },
+ ],
+};