Kiro icon indicating copy to clipboard operation
Kiro copied to clipboard

Drag and drop into chat should work for any file type (attach as path reference instead of rejecting by extension)

Open kkkemit opened this issue 2 weeks ago • 4 comments

Before opening, please confirm:

Operating System

win32

Kiro Version

1.4.178

Bug Description

Product: IDE 1.4.178, Windows 11

Problem: Dragging a file into the chat input shows the error "File type not supported: .trs". The chat UI only accepts pdf, csv, doc, docx, xls, xlsx, html, txt, md and a few image types. The list is hard-coded (isSupportedDocumentExtension in the kiro-ui-agent-chat bundle) and cannot be configured.

Why this is a problem: The agent can already read any local file when it is given the path. Typing or pasting the full path into the chat works for every extension. The drag-and-drop restriction therefore blocks nothing the agent cannot do. It only forces users to look up and paste a path by hand, which is extremely bad UX and slow. Examples that are rejected: .trs, .srt and .vtt transcripts, .json, .xml, .yaml, .log, .pptx.

Request: Dropping any file should work. Preferred behavior: for extensions that cannot be inlined as a document, insert the file as a path reference (the same result as #File or typing the path) instead of rejecting it. Alternatively, make the allowed list configurable, or detect text content instead of relying on the extension.

Related issues: #12132 (more file types for drag and drop, closed as a duplicate), #12305 (video attachments), #11747 (xlsx delivered as raw bytes), #5889 (universal drag and drop), #6458 (document attachments).

Steps to Reproduce

  1. Open Kiro IDE 1.4.178 on Windows 11 and start a new chat session.
  2. In Windows Explorer, take any file with an extension outside the allowed list, for example a Transcriber transcript named "meeting-20261116.trs" (any .srt, .vtt, .json, .xml or .pptx file also works).
  3. Drag the file onto the chat input box.
  4. Result: an error toast appears, "File type not supported: meeting-20261116.trs" (Source: kiroAgent), and the file is not attached.
  5. For comparison, drag a .txt or .md file onto the same box. It attaches normally. Typing or pasting the full path of the .trs file into the chat also works, and the agent can read the file.

Expected Behavior

Dropping any file onto the chat input should work, whatever its extension. The file should be added to the message and the agent should be able to read it.

For file types the chat cannot inline as a document (for example .trs, .srt, .vtt, .json, .xml, .pptx), the IDE should attach the file as a path reference. That gives the same result as typing the path or using #File, and the agent already reads such files that way.

Rejecting a drop with "File type not supported" should not happen for files the agent can already open by path.

Conversation ID

No response

Additional Context

No response

kkkemit avatar Nov 17 '26 07:11 kkkemit

🤖 Potential Duplicate Detected

This issue appears to be similar to:

What happens next?

  • ⏰ This issue will be automatically closed in 3 days
  • 🏷️ If this is not a duplicate, you can prevent automatic closure by adding a comment or reacting with 👎 to this message.
  • 💬 Comment on the original issue if you have additional information

Why is this marked as duplicate? Both issues are about file drag and drop functionality in Kiro IDE chat. Issue #11662 requests the ability to drag and drop files into chat (currently requiring manual typing), while the new issue specifically reports that drag and drop exists but rejects unsupported file extensions, requesting it work for any file type. They share the same core problem: files cannot be easily attached via drag and drop.

github-actions[bot] avatar Nov 17 '26 07:11 github-actions[bot]

This is not a duplicate of #11662.

#11662 asks for drag and drop to exist at all ("I have to type manually to attach a file"). Drag and drop already exists in 1.4.178 for pdf, csv, doc, docx, xls, xlsx, html, txt, md and images. This issue is about the extension allow-list rejecting every other file with the toast "File type not supported: .trs", even though the agent can read the same file when given its path.

Where the limit comes from: isSupportedDocumentExtension in the kiro-ui-agent-chat bundle checks a fixed list of 9 extensions. There is no setting for it.

Request: accept a drop of any extension, and for types that cannot be inlined as a document, insert the file as a path reference (same result as #File or typing the path). Accepting .trs, .srt, .vtt, .json, .xml, .yaml, .log and .pptx is a consequence of that, not the goal.

Please remove the duplicate label and send this back for review.

kkkemit avatar Nov 17 '26 08:11 kkkemit

Thank you for your feedback! 🙏

The duplicate label has been removed and this issue has been sent back for maintainer review.

A maintainer will review this issue shortly.

github-actions[bot] avatar Nov 17 '26 08:11 github-actions[bot]

Thanks for raising this. Accepting any dropped file, and attaching unsupported types as a path reference instead of rejecting them, would remove the need to paste paths by hand. Logging this as a feature request.

AnilMaktala avatar Nov 17 '26 21:11 AnilMaktala