Support for Built-in Agent Skills (#16045)

This commit is contained in:
N. Taylor Mullen
2026-01-09 22:26:58 -08:00
committed by GitHub
parent c37a32582f
commit 5eb841ae7e
17 changed files with 755 additions and 451 deletions
+15 -5
View File
@@ -23,12 +23,18 @@ async function listAction(
context: CommandContext,
args: string,
): Promise<void | SlashCommandActionReturn> {
const subCommand = args.trim();
const subArgs = args.trim().split(/\s+/);
// Default to SHOWING descriptions. The user can hide them with 'nodesc'.
let useShowDescriptions = true;
if (subCommand === 'nodesc') {
useShowDescriptions = false;
let showAll = false;
for (const arg of subArgs) {
if (arg === 'nodesc' || arg === '--nodesc') {
useShowDescriptions = false;
} else if (arg === 'all' || arg === '--all') {
showAll = true;
}
}
const skillManager = context.services.config?.getSkillManager();
@@ -43,7 +49,9 @@ async function listAction(
return;
}
const skills = skillManager.getAllSkills();
const skills = showAll
? skillManager.getAllSkills()
: skillManager.getAllSkills().filter((s) => !s.isBuiltin);
const skillsListItem: HistoryItemSkillsList = {
type: MessageType.SKILLS_LIST,
@@ -53,6 +61,7 @@ async function listAction(
disabled: skill.disabled,
location: skill.location,
body: skill.body,
isBuiltin: skill.isBuiltin,
})),
showDescriptions: useShowDescriptions,
};
@@ -278,7 +287,8 @@ export const skillsCommand: SlashCommand = {
subCommands: [
{
name: 'list',
description: 'List available agent skills. Usage: /skills list [nodesc]',
description:
'List available agent skills. Usage: /skills list [nodesc] [all]',
kind: CommandKind.BUILT_IN,
action: listAction,
},