Open-source Grok Bot alternative with a virtual machine that bots can use
TypeScript ai-agentsclaude-codecodexcomputer-usedockerelectrongrokgrok-botgrok-bot-alternativeself-hostedtypescript
Keep main's 404 when a bot cannot remove a skill (#5226)
milind-soni594979acda0c
diff --git a/server/routes/bot-skills.test.ts b/server/routes/bot-skills.test.tsindex bb40b80e60..cf61c92e5c 100644--- a/server/routes/bot-skills.test.ts+++ b/server/routes/bot-skills.test.ts@@ -144,10 +144,10 @@ describe("removing a skill from one bot", () => {expect((await call("GET", `/api/bots/${first}/skills`)).body.skills?.map((skill) => skill.name)).not.toContain(shared);const refused = await call("DELETE", `/api/bots/${first}/skills/${brought}`);- expect(refused.status).toBe(409);+ expect(refused.status).toBe(404);expect(refused.body.error).toMatch(/can't be removed from one bot/);const native = await call("DELETE", `/api/bots/${first}/skills/engine-notes`);- expect(native.status).toBe(409);+ expect(native.status).toBe(404);expect(native.body.error).toMatch(/can't be removed here/);expect((await call("DELETE", `/api/bots/${first}/skills/missing-skill`)).status).toBe(404);diff --git a/server/routes/bot-skills.ts b/server/routes/bot-skills.tsindex 686b76cdc7..da09cf4afb 100644--- a/server/routes/bot-skills.ts+++ b/server/routes/bot-skills.ts@@ -113,8 +113,8 @@ export function createBotSkillsRoutes(deps: BotSkillsRouteDeps): RouteHandler {}}const origin = (listBotSkills(bot).find((skill) => skill.name === name) as { origin?: string } | undefined)?.origin;- if (origin === "imported") return json(res, 409, { error: `"${name}" comes from this computer and can't be removed from one bot. Turn it off instead.` });- if (origin === "native") return json(res, 409, { error: `"${name}" comes from this bot's engine and can't be removed here.` });+ if (origin === "imported") return json(res, 404, { error: `"${name}" comes from this computer and can't be removed from one bot. Turn it off instead.` });+ if (origin === "native") return json(res, 404, { error: `"${name}" comes from this bot's engine and can't be removed here.` });return json(res, 404, { error: removed.error });}