Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/users/features/commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ Commands for adjusting interface appearance and work environment.
| ------------ | ---------------------------------------- | ----------------------------- |
| `/clear` | Clear terminal screen content | `/clear` (shortcut: `Ctrl+L`) |
| `/context` | Show context window usage breakdown | `/context` |
| → `detail` | Show per-item context usage breakdown | `/context detail` |
| `/theme` | Change Qwen Code visual theme | `/theme` |
| `/vim` | Turn input area Vim editing mode on/off | `/vim` |
| `/directory` | Manage multi-directory support workspace | `/dir add ./src,./tests` |
Expand Down
2 changes: 2 additions & 0 deletions packages/cli/src/i18n/locales/zh.js
Original file line number Diff line number Diff line change
Expand Up @@ -1713,6 +1713,8 @@ export default {
'Show context window usage breakdown.': '显示上下文窗口使用情况分解。',
'Run /context detail for per-item breakdown.':
'运行 /context detail 查看详细分解。',
'Show context window usage breakdown. Use "/context detail" for per-item breakdown.':
'显示上下文窗口使用情况分解。输入 "/context detail" 查看详细分解。',
'body loaded': '内容已加载',
memory: '记忆',
'{{region}} configuration updated successfully.': '{{region}} 配置更新成功。',
Expand Down
13 changes: 13 additions & 0 deletions packages/cli/src/ui/commands/contextCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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