MCPcopy Create free account
hub / github.com/diillson/chatcli / Close

Method Close

llm/partial_input.go:106–112  ·  view source on GitHub ↗

Close marks the reader done. After Close, no further Feed calls have effect. Returns the final accumulated buffer so callers can also json.Unmarshal it into their own typed struct for the canonical non-partial round-trip.

()

Source from the content-addressed store, hash-verified

104// json.Unmarshal it into their own typed struct for the canonical
105// non-partial round-trip.
106func (r *PartialInputReader) Close() string {
107 r.mu.Lock()
108 defer r.mu.Unlock()
109 r.closed = true
110 r.tryEmitLocked()
111 return r.buf.String()
112}
113
114// Snapshot returns the current accumulated buffer without mutating
115// state. Useful for diagnostics — pull the partial JSON into a log

Calls 4

tryEmitLockedMethod · 0.95
LockMethod · 0.80
UnlockMethod · 0.80
StringMethod · 0.45