MCPcopy Create free account
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 path, _ := call.Arguments["path"].(string)
282 return "▶ read_file: " + path
283 default:
284 // Fall back to the first non-empty string arg.
285 for _, v := range call.Arguments {
286 if s, ok := v.(string); ok && s != "" {
287 return fmt.Sprintf("▶ %s: %s", call.Name, firstLine(s))
288 }
289 }
290 return "▶ " + call.Name
291 }
292}
293
294// bashOutputHead / bashOutputTail bound what headTailBuffer retains: first 1MB
295// plus last 1MB of combined output. Far above ctx.Truncate's ~24KB relevance
296// threshold (nothing the model would ever see is dropped), small enough that a
297// firehose command can't OOM the process.

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