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

Method resolve

internal/llm/llm.go:594–605  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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.
596type serverStreamError struct{ msg string }
597
598func (e *serverStreamError) Error() string {
599 return "the server reported a stream error: " + e.msg
600}
601
602func readSSE(parent context.Context, body io.Reader, budget cloud.BudgetStatus, out chan<- Event, onFrame func(output bool)) (*chmctx.Message, int, int, error) {
603 scanner := bufio.NewScanner(body)
604 scanner.Buffer(make([]byte, 1<<16), 4<<20)
605
606 var (
607 fullContent strings.Builder
608 slots = map[int]*toolSlot{}

Callers 1

readSSEFunction · 0.80

Calls 2

StringMethod · 0.80
ErrorMethod · 0.80

Tested by

no test coverage detected