fix(slashcommand): exclude skills from tool description to avoid duplication with skill tool

This commit is contained in:
YeonGyu-Kim
2026-02-13 17:51:38 +09:00
parent fb65bf8def
commit 38ea1c372b
2 changed files with 10 additions and 12 deletions
+4 -5
View File
@@ -31,14 +31,13 @@ export function createSlashcommandTool(options: SlashcommandToolOptions = {}): T
const buildDescription = async (): Promise<string> => {
if (cachedDescription) return cachedDescription
const allItems = await getAllItems()
cachedDescription = buildDescriptionFromItems(allItems)
const commands = getCommands()
cachedDescription = buildDescriptionFromItems(commands)
return cachedDescription
}
if (options.commands !== undefined && options.skills !== undefined) {
const allItems = [...options.commands, ...options.skills.map(skillToCommandInfo)]
cachedDescription = buildDescriptionFromItems(allItems)
if (options.commands !== undefined) {
cachedDescription = buildDescriptionFromItems(options.commands)
} else {
void buildDescription()
}