You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit d1e30cf
Browse filesBrowse the repository at this point in the historyBrowse files
fix(gray-screen): bound mock server input and cancel work on disconnect
- bind to loopback by default, cap request body size, set a request timeout
- stop streaming when the client closes and only commit a scripted turn once delivered
- cover task isolation of loaded originals in FileChangesPanel
Copy file name to clipboardExpand all lines: scripts/gray-screen/mock-openai-server.mjs
+30-7Lines changed: 30 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -33,7 +33,7 @@
33
33
// Zoo Code settings: provider "OpenAI Compatible", base URL http://127.0.0.1:<port>/v1, any API key, model id "mock",
console.log(`[mock] OpenAI-compatible server listening on 0.0.0.0:${cfg.port} -> use http://127.0.0.1:${cfg.port}/v1 (scenario=${cfg.scenario}, maxRequests=${cfg.maxRequests}, sandbox=${cfg.dir}/)`)
439
+
server.requestTimeout=120_000
440
+
server.listen(cfg.port,cfg.host,()=>{
441
+
console.log(`[mock] OpenAI-compatible server listening on ${cfg.host}:${cfg.port} -> use http://127.0.0.1:${cfg.port}/v1 (scenario=${cfg.scenario}, maxRequests=${cfg.maxRequests}, sandbox=${cfg.dir}/)`)
0 commit comments