Skip to content

[Feature] Support image and file attachments in agent chat composers #397

Description

@s7952452

Problem

Paca now allows agents to read attachments that already belong to a task through read_task_attachment (#391). However, the agent chat composers themselves are still text-only.

On Paca v0.12.5, neither of these surfaces allows users to paste, drag and drop, or select an image/file:

  • the agent chat inside a project;
  • the standalone agent conversation page.

For screenshot-driven bug reports, test feedback, scanned materials, and requirement discussions, users must leave the conversation, upload the file to a task first, then return and tell the agent to read that task attachment. This breaks the natural chat workflow and is especially difficult for non-technical users.

This request is separate from #391: #391 covers agents reading existing task attachments; this request covers users attaching files to an agent-chat message.

Expected behavior

Agent chat composers should support:

  • pasting images from the clipboard;
  • dragging and dropping files;
  • selecting one or more files through an attachment button;
  • previewing/removing attachments before sending;
  • displaying sent attachments in conversation history;
  • sending the user's text and attachment references together as one logical message/turn;
  • making attachments available to the agent in the same turn.

For a conversation linked to a task, uploaded files should preferably become attachments of that task rather than creating a second isolated file store. For a standalone conversation, Paca should persist the files against the conversation/message and enforce the same permission and storage controls.

Suggested design

  1. Add a shared attachment-capable composer to both project chat and conversation pages.
  2. Upload files before sending the message and represent them as structured message attachment references, not base64 embedded in normal text. Preserve the user's text and ordered attachment references as one logical message so downstream tools can analyze each file in the context of the user's actual question.
  3. Every attachment reference should include at least a stable ID, scope (task or conversation), file name and MIME type in model-visible structured/text context. A text-only primary model must still be able to discover the attachment and call a configured OCR/vision/document-analysis tool instead of receiving an invisible image-only block.
  4. When task_id is present, store/reuse the file as a normal task attachment so it remains part of the durable work item.
  5. For standalone conversations without a task ID, expose a permission-aware conversation-attachment read path equivalent to read_task_attachment, so OCR/vision/document-analysis MCP tools can consume the file by ID without arbitrary URL access.
  6. Include the new attachment references in the current agent turn and allow the agent to consume them through the existing permission-aware attachment path introduced by [Feature] Let agents securely read task attachments, including text and images #391.
  7. Detect model capabilities:
    • pass images to vision-capable models;
    • for text-only models, return a clear limitation or use an explicitly configured OCR/vision proxy;
    • never silently discard an attachment.
  8. Enforce file count, size, MIME type, quota, malware/security checks, and project/task permissions.
  9. Keep conversation history bounded by storing durable references instead of repeatedly embedding large image payloads.

Acceptance criteria

  • A user can paste a PNG screenshot directly into the project agent chat, add text, and send both in one message.
  • Drag/drop and file-picker upload work for common image and text/code formats.
  • The attachment is visible in conversation history and remains available after reloading the page.
  • The agent receives the user's text and all attachment references as the same logical turn, preserving their relationship and order.
  • The agent can read the text attachment during that turn.
  • With a vision-capable model, the agent can describe or extract visible text from the image.
  • With a text-only primary model, attachment metadata/references remain model-visible and the agent can call a configured OCR/vision/document-analysis tool using the user's accompanying text as the analysis question. If no such tool is configured, the UI/agent clearly reports the limitation instead of ignoring the image.
  • In a task-linked conversation, the uploaded file is associated with the task and can later be read through read_task_attachment.
  • A standalone conversation attachment can be read by ID through a permission-aware API/tool path without requiring a task or exposing an arbitrary storage URL.
  • The feature works consistently in both the project chat panel and standalone conversation page.
  • Users without access to the owning project/task/conversation cannot access the file.

Related issues

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions