mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-30 12:40:44 +00:00
fix(cli): add 'detail' subcommand to /context command
The /context command was missing the subcommand autocomplete feature that other commands like /stats have. Now users can type '/context ' and see 'detail' as a suggestion in the dropdown. - Added 'detail' subCommand to contextCommand with its own description - Subcommand delegates to main action with 'detail' arg - Added missing translation key for full description in zh.js - Updated commands.md documentation Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
parent
e0aeee5414
commit
84f80201c7
3 changed files with 16 additions and 0 deletions
|
|
@ -373,4 +373,17 @@ export const contextCommand: SlashCommand = {
|
|||
|
||||
context.ui.addItem(contextUsageItem, Date.now());
|
||||
},
|
||||
subCommands: [
|
||||
{
|
||||
name: 'detail',
|
||||
get description() {
|
||||
return t('Show per-item context usage breakdown.');
|
||||
},
|
||||
kind: CommandKind.BUILT_IN,
|
||||
action: async (context: CommandContext) => {
|
||||
// Delegate to main action with 'detail' arg to show detailed view
|
||||
await contextCommand.action!(context, 'detail');
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue