MCPcopy Index your code
hub / github.com/codehamr/codehamr / String

Method String

internal/tools/bash.go:283–294  ·  view source on GitHub ↗

String reassembles head + tail. The in-band seam marker keeps the two halves from reading as contiguous; the accurate size report lives in the caller's end-of-output note (this marker sits at the ~1MB offset, inside the middle ctx.Truncate drops, so the model never reads it).

()

Source from the content-addressed store, hash-verified

281// caller's end-of-output note (this marker sits at the ~1MB offset, inside
282// the middle ctx.Truncate drops, so the model never reads it).
283func (w *headTailBuffer) String() string {
284 switch {
285 case w.tailBytes == 0:
286 return string(w.head)
287 case w.tailBytes <= int64(len(w.ring)):
288 return string(w.head) + string(w.ring[:w.tailBytes])
289 default:
290 return string(w.head) +
291 fmt.Sprintf("\n───── %d bytes OMITTED here (capture cap) ─────\n", w.droppedBytes()) +
292 string(w.ring[w.pos:]) + string(w.ring[:w.pos])
293 }
294}
295
296func firstLine(s string) string {
297 // IndexAny over both separators, not just '\n', so a CR or CRLF first line

Callers 15

BashFunction · 0.95
readSSEFunction · 0.80
resolveMethod · 0.80
TestChatStreamsContentFunction · 0.80
handleResizeSettleMethod · 0.80
applyDoneMethod · 0.80
ValueMethod · 0.80
dbgWriteMessageFunction · 0.80

Calls 1

droppedBytesMethod · 0.95