MCPcopy Create free account
hub / github.com/codehamr/codehamr / toolSlot

Struct toolSlot

internal/llm/llm.go:589–592  ·  view source on GitHub ↗

toolSlot accumulates one streamed tool call. OpenAI delivers `arguments` as JSON fragmented across chunks, each fragment invalid alone; we append raw and parse once, in resolve().

Source from the content-addressed store, hash-verified

587
588// readSSE reads OpenAI SSE frames until [DONE] or EOF, forwarding
589// content/reasoning/tool-call events to out. Returns the final assistant
590// message (content + accumulated tool calls), the server completion and prompt
591// token counts, and any scanner error. parent is threaded through so sends
592// abort on cancellation instead of blocking on an undrained buffer.
593// serverStreamError is an error the SERVER reported inside the SSE stream, as
594// opposed to a transport failure. Typed so the replay path can tell the two
595// apart: resending a request the server already refused just repeats the refusal.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected