Skip to content

feat(vscode): insert dropped resource paths - #2471

Open
ousamabenyounes wants to merge 2 commits into
MoonshotAI:mainfrom
ousamabenyounes:feat/issue-2245
Open

feat(vscode): insert dropped resource paths#2471
ousamabenyounes wants to merge 2 commits into
MoonshotAI:mainfrom
ousamabenyounes:feat/issue-2245

Conversation

@ousamabenyounes

@ousamabenyounes ousamabenyounes commented Jul 31, 2026

Copy link
Copy Markdown

Closes #2245.

What changed

  • Decode VS Code Explorer's standard URI-list drag payload and insert dropped files or folders as chat mentions at the current caret.
  • Use paths relative to the active working directory, while retaining absolute paths for external resources.
  • Support POSIX, Windows drive, and UNC-style paths, including canonical quoting for paths containing spaces.
  • Accept Remote SSH, WSL, dev-container, and other virtual-workspace resources only when their scheme and authority match the active workspace.
  • Preserve the existing image/video drop behavior by giving media uploads precedence when a drop exposes both files and URI data.

Why

The webview already intercepted every document drop, but only consumed media files. Explorer resources therefore appeared to be accepted while their paths were silently discarded. This adds the missing resource-path branch without regressing media uploads.

Test verification (RED → GREEN)

  • RED: the new focused regression suite failed before implementation because the drop-path module did not exist.
  • GREEN: focused suite: 11 tests passed, including remote workspaces, nested workdirs, and authority rejection.
  • GREEN: VS Code extension suite: 16 files / 316 tests passed.
  • GREEN: full local suite: lint, typecheck, 1,036 test files / 16,908 tests, and CLI build passed versus the upstream baseline of 1,035 files / 16,897 tests.
  • Revert proof: removing the implementation reproduces the original missing-module RED in the focused regression suite.
  • Independent code review: PASS after correcting media-drop precedence and canonical quoted mentions.

Disclosure

AI-assisted using OpenAI Codex. The human contributor reviewed the implementation and remains responsible for understanding, testing, licensing, and maintaining every submitted line.

@changeset-bot

changeset-bot Bot commented Jul 31, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: e8b4519

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ef36774116

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread apps/vscode/webview-ui/src/components/inputarea/path-drop.ts Outdated
@ousamabenyounes

Copy link
Copy Markdown
Author

Addressed the remote-workspace review in e8b4519ee: Explorer drops now accept only the active virtual workspace's exact scheme/authority, reject credential or cross-host payloads, and stay relative to a nested active workdir.

Validation: reproduced vscode-remote: being discarded and the authority bypass as RED; focused tests are 11/11 GREEN, and run-ci.sh improved from the upstream baseline of 16,897 passing tests to 16,908 with lint, typecheck, and build GREEN.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request]: Support Drag & Drop to Insert File/Folder Paths into the Chat

1 participant