MCPcopy Index your code
hub / github.com/codeaashu/claude-code / clearStreamAccumulatorForMessage

Function clearStreamAccumulatorForMessage

src/cli/transports/ccrClient.ts:210–223  ·  view source on GitHub ↗
(
  state: StreamAccumulatorState,
  assistant: {
    session_id: string
    parent_tool_use_id: string | null
    message: { id: string }
  },
)

Source from the content-addressed store, hash-verified

208 * signal that fires even when abort/interrupt/error skip SSE stop events.
209 */
210export function clearStreamAccumulatorForMessage(
211 state: StreamAccumulatorState,
212 assistant: {
213 session_id: string
214 parent_tool_use_id: string | null
215 message: { id: string }
216 },
217): void {
218 state.byMessage.delete(assistant.message.id)
219 const scope = scopeKey(assistant)
220 if (state.scopeToMessage.get(scope) === assistant.message.id) {
221 state.scopeToMessage.delete(scope)
222 }
223}
224
225type RequestResult = { ok: true } | { ok: false; retryAfterMs?: number }
226

Callers 1

writeEventMethod · 0.85

Calls 3

scopeKeyFunction · 0.85
deleteMethod · 0.65
getMethod · 0.65

Tested by

no test coverage detected