Skip to content

Conversation

@JustHereToHelp
Copy link

Summary

Fixes #746, fixes #2813

You can now drag a file from Finder (or Wave's own file browser) into a terminal block and it drops the quoted path. Been wanting this forever.

How it works:

  • Native dragover/drop event listeners on the terminal's connect element
  • Uses webUtils.getPathForFile() through a preload bridge since Electron 32 removed File.path
  • Paths with spaces get properly quoted
  • Added getPathForFile to the preload bridge (preload.ts) and typed it in custom.d.ts

Note: since this touches the preload bridge, it requires an app restart (not hot-reloadable).

Test plan

  • Drag a file from Finder into a terminal — should insert the quoted path
  • Drag a file with spaces in the name — should be properly quoted
  • Drag from Wave's file browser into terminal — should also work
  • Verify no interference with existing terminal mouse events

Drag files from Finder or Wave's file browser into a terminal block
to insert the quoted path. Uses webUtils.getPathForFile() through
a preload bridge since Electron 32 removed File.path.

Paths with spaces are properly shell-quoted.

Fixes wavetermdev#746, fixes wavetermdev#2813
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 11, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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]: Drag and drop file / folder path to CLI Drag and Drop files support.

1 participant