Skip to content

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

Keep server/index.ts within its size limit after the MCP result folder

milind-sonidc1352171687
diff --git a/server/index.ts b/server/index.ts
index bc8028103b..e8729ef9c1 100644
--- a/server/index.ts
+++ b/server/index.ts
@@ -8490,8 +8490,7 @@ async function beginTurn(
integrations,
...(integrations.browser && browserIsThePlace(turnSurfacePlan(bot, undefined, threadId, true)) ? { preloadBrowserTools: true } : {}),
...settingsTurnFields(cfg, DATA_DIR, managedPolicy.restrictsMcp()),
- cwd,
- ...(worksInWorkspace || guestConfined || cloudGuestOpened(threadId) ? {} : { toolResultFolder: messageFileRootsForThread(bot.id, threadId).find((root) => root !== ATTACHMENTS_DIR) }),
+ cwd, ...(worksInWorkspace || guestConfined || cloudGuestOpened(threadId) ? {} : { toolResultFolder: messageFileRootsForThread(bot.id, threadId).find((root) => root !== ATTACHMENTS_DIR) }),
botSettingsFile: botSettingsFile(bot),
}, (input) => quickFallback.sendTurn(instance, input, route.quickModel ? { model, own: bot.modelSelection, onFallback: () => store.patchMessage(threadId, userMessage.id, { quickModel: undefined }) } : undefined))), () => companyShutdown || !directTurnClaimExists(bot.id, dispatchClaimId, threadId), async () => {
await (runningTurnEngines.get(threadId) ?? instance).adapter.interruptTurn(threadId).catch(() => {});