MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / StripReadToolLineNumbers

Function StripReadToolLineNumbers

internal/sessions/transfer.go:290–292  ·  view source on GitHub ↗

StripReadToolLineNumbers removes line-number prefixes from Read tool output.

(output string)

Source from the content-addressed store, hash-verified

288
289// StripReadToolLineNumbers removes line-number prefixes from Read tool output.
290func StripReadToolLineNumbers(output string) string {
291 return lineNumberRe.ReplaceAllString(output, "")
292}
293
294// shellMetaRe matches common shell metadata lines.
295var shellMetaRe = regexp.MustCompile(`(?im)^(exit\s*code:\s*\d+|wall\s*time:.*|output:)\s*$`)

Calls

no outgoing calls