MCPcopy Create free account
hub / github.com/GongShichen/LuminaCode / truncateForMsg

Function truncateForMsg

tools/builtin.go:1727–1736  ·  view source on GitHub ↗
(s string, limit int)

Source from the content-addressed store, hash-verified

1725 if cmdCtx.Err() == context.DeadlineExceeded {
1726 bashpkg.TerminateProcessTree(cmd)
1727 return -1, fmt.Sprintf("Error: Command timed out after %ss.\n\nCommand: %s", formatPythonFloatSeconds(timeout), originalCommand)
1728 }
1729 exitCode := 0
1730 if cmd.ProcessState != nil {
1731 exitCode = cmd.ProcessState.ExitCode()
1732 } else if err != nil {
1733 exitCode = -1
1734 }
1735 output := stdout.String()
1736 if stderr.Len() > 0 {
1737 if output != "" {
1738 output += "\n"
1739 }

Callers 3

ExecuteMethod · 0.85
handleToolSearchQueryFunction · 0.85
matchFailureSnippetFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected