Open-source, secure environment with real-world tools for enterprise-grade agents.
Python agentaiai-agentai-agentscode-interpretercopilotdevelopmentdevtoolsgptgpt-4javascriptllmnextjsopenaipythonreactsoftwaretypescript
Fix docs build (#866)
Jakub Novák400bb86e416e
diff --git a/apps/web/src/lib/utils.ts b/apps/web/src/lib/utils.tsindex 2e5021059..b5286fa14 100644--- a/apps/web/src/lib/utils.ts+++ b/apps/web/src/lib/utils.ts@@ -8,6 +8,10 @@ export function cn(...inputs: ClassValue[]) {// Verify that the sandbox exists and is associated with the API keyexport async function verifySandbox(apiKey: string, sandboxId: string) {- const sandboxes = await Sandbox.list({ apiKey })- return sandboxes.some((sandbox) => sandbox.sandboxId === sandboxId)-}\ No newline at end of file+ try {+ const sandbox = await Sandbox.getInfo(sandboxId, { apiKey })+ return sandbox.state === 'running'+ } catch (error) {+ return false+ }+}