-
Notifications
You must be signed in to change notification settings - Fork 294
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
Request for unstable API permission for an extension #16221
Comments
Thanks for looking into this. Also added a general note on using proposed API https://github.com/microsoft/vscode-jupyter/wiki/Extension-API |
Yes, that is the correct id. |
@gjsjohnmurray I think you should be able to use this today, export interface JupyterServerConnectionInformation {
/**
* The `fetch` method to use.
*/
readonly fetch?: (input: RequestInfo, init?: RequestInit) => Promise<Response>;
/**
* The `WebSocket` object constructor.
*/
readonly WebSocket?: typeof WebSocket; Let me know if it doesn't work for you. |
@DonJayamanne I am trying to use const jupyterKernelService = await jupyterApi.getKernelService();
if (!jupyterKernelService) {
vscode.window.showErrorMessage('Cannot access jupyterApi.getKernelService() - try using VS Code Insiders');
return;
} Next I create a new notebook: await vscode.commands.executeCommand('ipynb.newUntitledIpynb');
const nbEditor = vscode.window.activeNotebookEditor; Get the kernel specifications: const kernelConnectionMetadataArray = await jupyterKernelService.getKernelSpecifications(); I then search the array to get an id I can use as an argument to your API's const kernelConnectionMetadata = kernelConnectionMetadataArray.find((item: any) => item.kind === 'startUsingRemoteKernelSpec' && item.baseUrl === myBaseUrl && item.kernelSpec.name === myKernelSpecName);
await jupyterApi.openNotebook(nbUri, kernelConnectionMetadata.id); It's working well on VS Code Insiders, but on Stable I'm getting this notification: AFAIK you'd need to add my extension id to a list somewhere to make this possible on Stable. |
‘ getKernelService’ should not be used |
At this point I'm not trying to replace my fake jupyter server with your proxy fetch and websocket mechanism (see your comment intersystems-community/vscode-iris-jupyter-server#6 (comment)). Rather, having successfully migrated to the finalized JupyterServerProvider API I've been trying to add a way from our UI's tree of servers to be able to launch a new notebook using one of the kernelspecs that the target server provides. To visualize my goal, imagine adding "Create Interactive Window" and "Create Jupyter Notebook" buttons on the Kernel Specifications rows of your Jupyter Powertoys extension: I know the baseUrl and the kernelSpec.name but what I need to pass to your openNotebook function is the id of the matching kernelConnectionMetadata item. Maybe a better solution than me using getKernelService is for you to make openNotebook accept this alternative object in its second argument: { kind: 'startUsingRemoteKernelSpec', baseUrl: 'http://localhost:50773/irislatest:USER', kernelSpecName: 'objectscript-int' } leaving it down to you to match those values in your kernelConnectionMetadata[] array and get the id that I currently have to pass in on the openNotebook call. |
Thank you for getting back Please can you file a new issue with your requirements so we can track and discuss that separately Thanks again |
It used unstable API from the Jupyter extension which isn't likely to stabilize (see microsoft/vscode-jupyter#16221)
Please allow the extension Jupyter Server Proxy for InterSystems IRIS (intersystems-community.iris-jupyter-server) to use unstable API in production.
The text was updated successfully, but these errors were encountered: