fix: apply scope filter to getSystemMcpServerNames and fix async native skill description refresh

This commit is contained in:
YeonGyu-Kim
2026-03-31 17:05:55 -07:00
parent 9f2c4500e8
commit 8fba90766d
4 changed files with 126 additions and 9 deletions
+3 -3
View File
@@ -265,8 +265,8 @@ export function createSkillTool(options: SkillLoadOptions = {}): ToolDefinition
})
}
const buildDescription = async (): Promise<string> => {
if (cachedDescription) return cachedDescription
const buildDescription = async (force = false): Promise<string> => {
if (!force && cachedDescription) return cachedDescription
const skills = await getSkills()
const commands = getCommands()
const skillInfos = skills.map(loadedSkillToInfo)
@@ -294,7 +294,7 @@ export function createSkillTool(options: SkillLoadOptions = {}): ToolDefinition
cachedDescription = formatCombinedDescription(skillInfos, commandsForDescription)
if (needsAsyncRefresh) {
void buildDescription()
void buildDescription(true)
}
} else if (options.commands !== undefined) {
cachedDescription = formatCombinedDescription([], options.commands)