MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / refreshSkillCommands

Method refreshSkillCommands

apps/kimi-code/src/tui/kimi-tui.ts:413–434  ·  view source on GitHub ↗
(session?: SkillListSession)

Source from the content-addressed store, hash-verified

411 }
412
413 async refreshSkillCommands(session?: SkillListSession): Promise<void> {
414 if (session === undefined) {
415 this.skillCommands = [];
416 this.skillCommandMap.clear();
417 this.setupAutocomplete();
418 return;
419 }
420
421 let skills;
422 try {
423 skills = await session.listSkills();
424 } catch {
425 return;
426 }
427 const skillCommands = buildSkillSlashCommands(skills);
428 this.skillCommands = skillCommands.commands;
429 this.skillCommandMap.clear();
430 for (const [commandName, skillName] of skillCommands.commandMap) {
431 this.skillCommandMap.set(commandName, skillName);
432 }
433 this.setupAutocomplete();
434 }
435
436 async refreshPluginCommands(session?: Session): Promise<void> {
437 if (session === undefined) {

Callers 4

finishStartupMethod · 0.95
switchToSessionMethod · 0.95
createNewSessionMethod · 0.95

Calls 5

setupAutocompleteMethod · 0.95
buildSkillSlashCommandsFunction · 0.90
clearMethod · 0.65
listSkillsMethod · 0.65
setMethod · 0.65

Tested by

no test coverage detected