MCPcopy Create free account
hub / github.com/Qinbf/groundmap / safeEnqueue

Function safeEnqueue

tools/debug-console/app/api/chat/route.ts:140–148  ·  view source on GitHub ↗
(chunk: Uint8Array)

Source from the content-addressed store, hash-verified

138 async start(controller) {
139 let closed = false;
140 const safeEnqueue = (chunk: Uint8Array) => {
141 if (closed) return;
142 try {
143 controller.enqueue(chunk);
144 } catch {
145 // controller 已关闭——忽略
146 closed = true;
147 }
148 };
149 // 整段逻辑跑在 workspaceContext 作用域内:root_index 预热 + runAgent 深处的所有
150 // executeTool 都会读到 workspace,并在调 web 时带上 kb_workspace cookie。
151 await workspaceContext.run(workspace, async () => {

Callers 1

startFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected