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)
| 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. |
| 628 | func (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 |