MCPcopy Create free account
hub / github.com/experdot/pointer / finalizeComplete

Method finalizeComplete

src/main/aiHandler.ts:75–90  ·  view source on GitHub ↗
(requestId: string)

Source from the content-addressed store, hash-verified

73 }
74
75 private finalizeComplete(requestId: string): void {
76 const state = this.requestStates.get(requestId)
77 if (!state || (state.status !== 'running' && state.status !== 'aborted')) {
78 return
79 }
80
81 state.status = 'completed'
82 state.event.sender.send(state.eventChannel, {
83 requestId,
84 type: 'complete',
85 content: state.fullResponse,
86 reasoning_content: state.fullReasoning || undefined
87 } as AIStreamChunk)
88
89 this.cleanupRequest(requestId)
90 }
91
92 private finalizeError(requestId: string, error: string): void {
93 const state = this.requestStates.get(requestId)

Callers 3

finalizeTerminalErrorMethod · 0.95
processStreamResponseMethod · 0.95
sendMessageStreamingMethod · 0.95

Calls 2

cleanupRequestMethod · 0.95
getMethod · 0.65

Tested by

no test coverage detected