mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-30 04:30:48 +00:00
feat(cli): add detail mode to /context and track loaded skill bodies
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
parent
b629de35cf
commit
4de9688543
7 changed files with 246 additions and 78 deletions
|
|
@ -7,7 +7,11 @@
|
|||
import type { SlashCommand } from './types.js';
|
||||
import { CommandKind } from './types.js';
|
||||
import { t } from '../../i18n/index.js';
|
||||
import { uiTelemetryService } from '@qwen-code/qwen-code-core';
|
||||
import {
|
||||
uiTelemetryService,
|
||||
ToolNames,
|
||||
SkillTool,
|
||||
} from '@qwen-code/qwen-code-core';
|
||||
|
||||
export const clearCommand: SlashCommand = {
|
||||
name: 'clear',
|
||||
|
|
@ -25,6 +29,15 @@ export const clearCommand: SlashCommand = {
|
|||
// Reset UI telemetry metrics for the new session
|
||||
uiTelemetryService.reset();
|
||||
|
||||
// Clear loaded-skills tracking so /context doesn't show stale data
|
||||
const skillTool = config
|
||||
.getToolRegistry()
|
||||
?.getAllTools()
|
||||
.find((tool) => tool.name === ToolNames.SKILL);
|
||||
if (skillTool instanceof SkillTool) {
|
||||
skillTool.clearLoadedSkills();
|
||||
}
|
||||
|
||||
if (newSessionId && context.session.startNewSession) {
|
||||
context.session.startNewSession(newSessionId);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue