continue icon indicating copy to clipboard operation
continue copied to clipboard

Fix image drop from main editor

Open aadarshkt opened this issue 3 months ago • 1 comments

Description

Removed console log and changed launch configuration

AI Code Review

  • Team members only: AI review runs automatically when PR is opened or marked ready for review
  • Team members can also trigger a review by commenting @continue-review

Checklist

  • [x] I've read the contributing guide
  • [x] The relevant docs, if any, have been updated or created
  • [x] The relevant tests, if any, have been updated or created

Screen recording or screenshot

Tests

[ What tests were added or updated to ensure the changes work as expected? ]


Summary by cubic

Fixes image drag-and-drop in the main editor. Drops now work for files and for images dragged from VS Code (vscode-resource URLs), which are read and inserted as data URLs.

  • Bug Fixes

    • Handle drops in a ProseMirror plugin and insert images when the selected model supports images.
    • Resolve images dragged from VS Code (file+.vscode-resource URLs) by reading the file and converting to a data URL.
    • Make the drag overlay non-blocking and hide it reliably on drop/leave.
  • Refactors

    • Added readFileAsDataUrl protocol and VS Code handler (PNG/JPEG) to return data URLs.
    • Added helpers to parse vscode-resource URLs and extract them from dropped HTML.
    • Simplified DragOverlay component and set pointer-events: none.
    • Added a gui:build VS Code task and increased Node memory to avoid OOM during builds.

aadarshkt avatar Oct 19 '25 11:10 aadarshkt

@aadarshkt note failing prettier checks!

RomneyDa avatar Nov 05 '25 00:11 RomneyDa

@aadarshkt this is a bit stale and pending updates, I will close for now and free to re-open when ready! I think it would be a great addition to the VS Code extension.

RomneyDa avatar Nov 25 '25 19:11 RomneyDa