mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-20 16:57:46 +00:00
feat: Add /config refresh command (#4993)
Co-authored-by: Bryan Morgan <bryanmorgan@google.com>
This commit is contained in:
committed by
GitHub
parent
165b29c3b1
commit
02bf8c16c7
33
packages/cli/src/ui/commands/configCommand.ts
Normal file
33
packages/cli/src/ui/commands/configCommand.ts
Normal file
@@ -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.',
|
||||
};
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
@@ -59,6 +59,7 @@ export interface CommandContext {
|
||||
/** Toggles a special display mode. */
|
||||
toggleCorgiMode: () => void;
|
||||
toggleVimEnabled: () => Promise<boolean>;
|
||||
refreshConfig: () => Promise<void>;
|
||||
};
|
||||
// Session-specific data
|
||||
session: {
|
||||
|
||||
Reference in New Issue
Block a user