fix(jetbrains): add dropped files as references - #12869
Conversation
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Incremental review of Files Reviewed (2 files)
Previous Review Summary (commit cee2e36)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit cee2e36)Status: 2 Issues Found | Recommendation: Address before merge Overview
Issue Details (click to expand)SUGGESTION
The change is well-scoped: dropped non-image files become Fix these issues in Kilo Cloud Files Reviewed (6 files)
Reviewed by kimi-k3 · Input: 91.9K · Output: 4.2K · Cached: 156.3K Review guidance: REVIEW.md from base branch |
fix(jetbrains): add dropped files as references
Issue
Fixes #12837
Context
JetBrains users could see the "Drop files here" overlay when dragging files into the session, but code files such as
.phpwere silently ignored on drop. The accept path only checked advertised drag flavors, while the attachment extractor filtered out anything that was not an image or a hardcoded text extension.Implementation
Dropped non-image files are now added as
file://reference parts withtext/plain, matching the existing@-mention flow so the CLI reads the files as prompt context. Images keep the existing embedded attachment behavior and model capability gate.The prompt drop path also falls back to reading file data from the
DnDEventtransferable if IntelliJ's attached object extraction returns nothing, which helps native/Linux file-list drops. Accepted drops that resolve to no usable files now show a warning instead of failing silently.Screenshots / Video
Image drop
Text drop
How to Test
Manual/local verification
./gradlew :frontend:test --tests 'ai.kilocode.client.session.model.PromptAttachmentExtractorTest' --tests 'ai.kilocode.client.session.ui.PromptPanelTest' --tests 'ai.kilocode.client.session.SessionUiLayoutTest'frompackages/kilo-jetbrains/successfully../gradlew typecheckfrompackages/kilo-jetbrains/successfully.git diff --checksuccessfully.bun turbo typecheck --filter=!@kilocode/kilo-jetbrainssuccessfully.bun turbo typecheck --filter=@kilocode/kilo-jetbrainssuccessfully.Reviewer test steps
.phpor other code file from the Project view onto the prompt input and send a prompt that asks about it.Blocked checks and substitute verification
Checklist
Get in Touch
N/A