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

Function RenderReadFileToolResult

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

Source from the content-addressed store, hash-verified

21}
22
23func RenderReadFileToolResult(content string, isError bool) string {
24 if isError {
25 return "Read failed: " + truncateString(content, 150)
26 }
27 lineCount := 0
28 if content != "" {
29 lineCount = strings.Count(content, "\n") + 1
30 }
31 return "Read " + strconv.Itoa(lineCount) + " lines"
32}
33
34func RenderGroupedReadFileToolUse(inputs []ReadFileInput) string {
35 if len(inputs) == 0 {

Callers

nothing calls this directly

Calls 2

CountMethod · 0.80
truncateStringFunction · 0.70

Tested by

no test coverage detected