9ad8e7ca78
Agent mode does not persist `rendered_content` for user messages, so when the next turn's history was rebuilt from DB, attachments uploaded in prior turns disappeared — the model only saw the raw query plus the prior assistant reply, breaking follow-up questions that referenced the file (e.g. "what is in there?"). Reconstruct the attachment prompt from the stored `Attachments` column when `RenderedContent` is empty, mirroring how image captions are already replayed. KnowledgeQA turns (which do persist `RenderedContent`) are unaffected and won't get attachments injected twice. Refs #1237