feat(sandbox): default Network Sandbox to off and add settings toggle switch (#304)

This commit is contained in:
Yiling-J
2026-08-13 20:50:34 +08:00
committed by GitHub
parent 7f185ca23c
commit 9d50301a43
28 changed files with 372 additions and 39 deletions
+3
View File
@@ -190,6 +190,9 @@ export async function createAgentSession(params: CreateAgentSessionParams) {
const sandbox = await prisma.sandbox.findUnique({
where: { teamId },
})
if (sandbox && !sandbox.networkSandboxEnabled) {
return true
}
const pendingDomains = sandbox?.pendingDomains || []
if (!pendingDomains.includes(host)) {
await prisma.sandbox.upsert({