(session?: SkillListSession)
| 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) { |
no test coverage detected