Skip to content

Open-source Grok Bot alternative with a virtual machine that bots can use

#5146: a skills preview with no thread looks for no project skills

milind-sonifac449d112bf
diff --git a/server/host/skills-library.ts b/server/host/skills-library.ts
index 4cff5672bd..10994a1a73 100644
--- a/server/host/skills-library.ts
+++ b/server/host/skills-library.ts
@@ -289,7 +289,8 @@ export function createSkillsLibraryHost(deps: SkillsLibraryHostDeps) {
const assigned = threadId === undefined ? (skillsLibraryEnabled(cfg) ? bot.assignedSkills ?? [] : undefined) : conversationSkills(bot, threadId);
const available = importsFor(bot, assigned, instance);
const listed = listedImports(bot, available);
- const project = projectInUse(bot, threadId ?? bot.threadId, cwd, instance, assigned);
+ const thread = threadId ?? bot.threadId;
+ const project = thread ? projectInUse(bot, thread, cwd, instance, assigned) : [];
return skillsSystemPrompt(bot.id, assigned, threadId === undefined ? undefined : conversationStartedAt(threadId)) +
importedSkillsPrompt(listed, available.length - listed.length) + projectSkillsPrompt(project);
},