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

Function RenderBashToolResult

tools/basic_ui.go:124–141  ·  view source on GitHub ↗
(content string, isError bool)

Source from the content-addressed store, hash-verified

122}
123
124func RenderBashToolResult(content string, isError bool) string {
125 if isError {
126 return "Bash failed: " + truncateString(content, 150)
127 }
128 if strings.HasPrefix(content, "[Exit code:") {
129 return strings.Split(content, "\n")[0]
130 }
131 firstLine := ""
132 trimmed := strings.TrimSpace(content)
133 if trimmed != "" {
134 firstLine = strings.Split(trimmed, "\n")[0]
135 }
136 firstLine = truncateString(firstLine, 150)
137 if firstLine == "" {
138 return "(empty output)"
139 }
140 return firstLine
141}
142
143func RenderGroupedBashToolUse(inputs []BashInput) string {
144 if len(inputs) == 0 {

Callers

nothing calls this directly

Calls 1

truncateStringFunction · 0.70

Tested by

no test coverage detected