MCPcopy Create free account
hub / github.com/Noumena-Network/code / ensureStarted

Function ensureStarted

src/services/api/openAICompatWsV2Native.ts:182–192  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

180 }
181
182 const ensureStarted = () => {
183 if (!startPromise) {
184 startPromise = (async () => {
185 if (started) return
186 started = true
187 logForDebugging(`[OpenAICompatWsV2] starting request ${requestId}`)
188 await binding.wsV2Start?.(sessionId, requestId, JSON.stringify(request))
189 })()
190 }
191 return startPromise
192 }
193
194 const closeAfterTerminalFrame = async () => {
195 removeAbortHandler()

Callers 1

pullFunction · 0.85

Calls 1

logForDebuggingFunction · 0.50

Tested by

no test coverage detected