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

Method Snapshot

llm/partial_input.go:117–121  ·  view source on GitHub ↗

Snapshot returns the current accumulated buffer without mutating state. Useful for diagnostics — pull the partial JSON into a log field without disturbing the streaming pipeline.

()

Source from the content-addressed store, hash-verified

115// state. Useful for diagnostics — pull the partial JSON into a log
116// field without disturbing the streaming pipeline.
117func (r *PartialInputReader) Snapshot() string {
118 r.mu.Lock()
119 defer r.mu.Unlock()
120 return r.buf.String()
121}
122
123// tryEmitLocked attempts to parse the buffer and emit any new
124// top-level string fields. Must be called with r.mu held.

Calls 3

LockMethod · 0.80
UnlockMethod · 0.80
StringMethod · 0.45