MCPcopy Create free account
hub / github.com/ephraimduncan/opencode-cursor / handleStreamingResponse

Function handleStreamingResponse

src/proxy.ts:1338–1351  ·  view source on GitHub ↗
(
  payload: CursorRequestPayload,
  accessToken: string,
  modelId: string,
  bridgeKey: string,
  convKey: string,
)

Source from the content-addressed store, hash-verified

1336}
1337
1338function handleStreamingResponse(
1339 payload: CursorRequestPayload,
1340 accessToken: string,
1341 modelId: string,
1342 bridgeKey: string,
1343 convKey: string,
1344): Response {
1345 const { bridge, heartbeatTimer } = startBridge(accessToken, payload.requestBytes);
1346 return createBridgeStreamResponse(
1347 bridge, heartbeatTimer,
1348 payload.blobStore, payload.mcpTools,
1349 modelId, bridgeKey, convKey,
1350 );
1351}
1352
1353/** Resume a paused bridge by sending MCP results and continuing to stream. */
1354function handleToolResultResume(

Callers 1

handleChatCompletionFunction · 0.85

Calls 2

startBridgeFunction · 0.85

Tested by

no test coverage detected