-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add OpenRPC methods for open_workspace
and workspace_folder
#2501
Conversation
rstudioapi::getActiveProject()
open_workspace
and workspace_folder
TODO: |
src/positron-dts/positron.d.ts
Outdated
* | ||
* Returns the path to the workspace folder, or first folder if there are multiple. | ||
*/ | ||
export function workspaceFolder(): Thenable<string | null>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need our own API for this? (naively, it seems like extensions could use https://code.visualstudio.com/api/references/vscode-api#workspace.workspaceFolders)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extensions definitely could use that, yes, but I believe what we need here is to have this available in our methods namespace, to be able to call it from a runtime (not from the extension). Let me know if I am misunderstanding, or missing a better way to do it!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, this is positron.d.ts, so it's the interface exposed to extensions rather than runtimes. I think you can delete this (and the associated changes that support it) and just leave the UI comm supporting bits.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK yep, I now understand what contributed to my misunderstanding on this, and actually this makes way more sense now to me. Thank you!
Intent
Addresses #1312
Approach
Chugging along with OpenRPC methods 🚂
QA Notes
Goes along with posit-dev/ark#272