editor: Fix copy file actions not working in remote environments (#43362)

Closes #42500

Release Notes:

- Fixed all three editor actions not working in remote environments
  - `editor: copy file name`
  - `editor: copy file location`
  - `editor: copy file name without extension`

Here's the before/after:




https://github.com/user-attachments/assets/bfb03e99-2e1a-47a2-bd26-280180154fe3
9e69ac889cMayank Verma committed on 11/24/2025, 9:45:12 PM· committed by GitHubparent7694647
2 files changedLine totals unavailable