MCPcopy Index your code
hub / github.com/docker/docker-agent / writeToolMessage

Function writeToolMessage

pkg/app/transcript/transcript.go:137–146  ·  view source on GitHub ↗
(builder *strings.Builder, msg session.Message)

Source from the content-addressed store, hash-verified

135}
136
137func writeToolMessage(builder *strings.Builder, msg session.Message) {
138 builder.WriteString("### Tool Result")
139 if msg.Message.ToolCallID != "" {
140 fmt.Fprintf(builder, " (ID: %s)", msg.Message.ToolCallID)
141 }
142 fmt.Fprintf(builder, "\n\n")
143
144 toJSONString(builder, msg.Message.Content)
145 builder.WriteString("\n")
146}
147
148func toJSONString(builder *strings.Builder, in string) {
149 var content any

Callers 1

PlainTextFunction · 0.85

Calls 1

toJSONStringFunction · 0.85

Tested by

no test coverage detected