MCPcopy Create free account
hub / github.com/betta-tech/byo-coding-agent / truncate

Function truncate

internal/agent/agent.go:196–201  ·  view source on GitHub ↗
(s string, n int)

Source from the content-addressed store, hash-verified

194}
195
196func truncate(s string, n int) string {
197 if len(s) <= n {
198 return s
199 }
200 return s[:n] + "…"
201}
202
203// extractWritePath pulls the path out of a write_file tool input so the
204// approval prompt can name the target file. Returns "" on any parse

Callers 1

executeToolMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected