MCPcopy
hub / github.com/docker/docker-agent / processInlineAttachment

Method processInlineAttachment

pkg/app/app.go:628–631  ·  view source on GitHub ↗

processInlineAttachment handles content that is already in memory (e.g. pasted text). The content is appended to textBuilder wrapped in an XML tag for context.

(att messages.Attachment, textBuilder *strings.Builder)

Source from the content-addressed store, hash-verified

626// processInlineAttachment handles content that is already in memory (e.g. pasted
627// text). The content is appended to textBuilder wrapped in an XML tag for context.
628func (a *App) processInlineAttachment(att messages.Attachment, textBuilder *strings.Builder) {
629 textBuilder.WriteString("\n\n")
630 fmt.Fprintf(textBuilder, "<attached_file path=%q>\n%s\n</attached_file>", att.Name, att.Content)
631}
632
633// Retry re-runs the agent loop on the current session without adding a new
634// user message. It is used to resume the conversation after an error: the

Callers 1

RunMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected