Skip to content

feat: let a channel attach File RAG attachments to the answer #675 - #678

Merged
Fedir-Yatsenko merged 1 commit into
developmentfrom
feat/675-rag-attachments-target
Sep 16, 2026
Merged

Fedir-Yatsenko merged 1 commit into
developmentfrom
feat/675-rag-attachments-target

Conversation

@Fedir-Yatsenko

@Fedir-Yatsenko Fedir-Yatsenko commented Sep 16, 2026

Copy link
Copy Markdown
Collaborator

Applicable issues

Description of changes

Adds an attachmentsTarget option to the File RAG tool details, so a channel can decide where the documents the RAG cites are attached:

  • stage (default) — the tool-result stage, exactly as today.
  • choice — the assistant message, next to the answer the user is reading.

The destination is exclusive: choice moves the attachments rather than duplicating them. The RAG answer itself always goes to the stage whichever value is set, attachmentUrlOverride keeps applying either way, and the attachments are still emitted once after the RAG stream finishes, so the emit timing is unchanged. Both RAG versions pick this up, since GENERIC reuses the DIAL streaming flow.

_append_attachments now takes the sink instead of hardcoding a Stage, and a small _attachments_sink helper resolves it from the config at the single call site.

Channels that do not set the field behave identically to today, and channel config is stored as JSON, so no migration is needed.

Checklist

New `attachmentsTarget` option on the File RAG tool details: `stage` (default,
today's behavior) keeps the attachments on the tool-result stage, `choice` moves
them to the assistant message. The answer itself always stays on the stage, and
`attachmentUrlOverride` applies either way.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@Fedir-Yatsenko Fedir-Yatsenko self-assigned this Sep 16, 2026
@Fedir-Yatsenko Fedir-Yatsenko added enhancement New feature or request python Pull requests that update python code labels Sep 16, 2026
@Fedir-Yatsenko
Fedir-Yatsenko enabled auto-merge (squash) September 16, 2026 11:28
@Fedir-Yatsenko
Fedir-Yatsenko merged commit e899a8e into development Sep 16, 2026
11 checks passed
@Fedir-Yatsenko
Fedir-Yatsenko deleted the feat/675-rag-attachments-target branch September 16, 2026 11:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request python Pull requests that update python code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Let a channel attach File RAG attachments to the answer instead of the tool stage

2 participants