Skip to content

Commit fea5d0d

Browse files
committed
Rename more jupyter related named views, commands, etc
Signed-off-by: Tomas Kislan <tomas@kislan.sk>
1 parent 309a165 commit fea5d0d

File tree

10 files changed

+43
-89
lines changed

10 files changed

+43
-89
lines changed

package.json

Lines changed: 30 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@
5555
],
5656
"activationEvents": [
5757
"onLanguage:python",
58-
"onLanguageModelTool:configure_notebook",
59-
"onLanguageModelTool:notebook_install_packages",
60-
"onLanguageModelTool:notebook_list_packages",
58+
"onLanguageModelTool:configure_deepnote_notebook",
59+
"onLanguageModelTool:deepnote_notebook_install_packages",
60+
"onLanguageModelTool:deepnote_notebook_list_packages",
6161
"onNotebook:deepnote",
6262
"onNotebook:interactive"
6363
],
@@ -821,7 +821,7 @@
821821
],
822822
"submenus": [
823823
{
824-
"id": "editor.interactiveWindow.context",
824+
"id": "deepnote.editor.interactiveWindow.context",
825825
"label": "%deepnote.command.editor.interactiveWindow.context.label%"
826826
},
827827
{
@@ -859,54 +859,54 @@
859859
],
860860
"editor/context": [
861861
{
862-
"submenu": "editor.interactiveWindow.context",
863-
"group": "Jupyter2"
862+
"submenu": "deepnote.editor.interactiveWindow.context",
863+
"group": "Deepnote2"
864864
},
865865
{
866866
"when": "editorFocus && editorLangId == python && deepnote.hascodecells && !notebookEditorFocused && isWorkspaceTrusted",
867867
"command": "deepnote.exportfileasnotebook",
868-
"group": "Jupyter3@2"
868+
"group": "Deepnote3@2"
869869
},
870870
{
871871
"when": "resourceExtname == .deepnote",
872872
"command": "deepnote.openInDeepnote",
873873
"group": "navigation"
874874
}
875875
],
876-
"editor.interactiveWindow.context": [
876+
"deepnote.editor.interactiveWindow.context": [
877877
{
878878
"when": "editorFocus && editorLangId == python && deepnote.hascodecells && !notebookEditorFocused && isWorkspaceTrusted",
879879
"command": "deepnote.runallcells",
880-
"group": "Jupyter2"
880+
"group": "Deepnote2"
881881
},
882882
{
883883
"when": "editorFocus && editorLangId == python && deepnote.hascodecells && !notebookEditorFocused && isWorkspaceTrusted",
884884
"command": "deepnote.runcurrentcell",
885-
"group": "Jupyter2"
885+
"group": "Deepnote2"
886886
},
887887
{
888888
"when": "editorFocus && editorLangId == python && deepnote.hascodecells && !notebookEditorFocused && isWorkspaceTrusted",
889889
"command": "deepnote.runcurrentcelladvance",
890-
"group": "Jupyter2"
890+
"group": "Deepnote2"
891891
},
892892
{
893893
"command": "deepnote.runFileInteractive",
894-
"group": "Jupyter2",
894+
"group": "Deepnote2",
895895
"when": "editorFocus && editorLangId == python && !notebookEditorFocused && isWorkspaceTrusted"
896896
},
897897
{
898898
"command": "deepnote.runfromline",
899-
"group": "Jupyter2",
899+
"group": "Deepnote2",
900900
"when": "editorFocus && editorLangId == python && !notebookEditorFocused && isWorkspaceTrusted"
901901
},
902902
{
903903
"command": "deepnote.runtoline",
904-
"group": "Jupyter2",
904+
"group": "Deepnote2",
905905
"when": "editorFocus && editorLangId == python && !notebookEditorFocused && isWorkspaceTrusted"
906906
},
907907
{
908908
"command": "deepnote.execSelectionInteractive",
909-
"group": "Jupyter2",
909+
"group": "Deepnote2",
910910
"when": "editorFocus && editorLangId == python && !notebookEditorFocused && isWorkspaceTrusted"
911911
}
912912
],
@@ -1042,7 +1042,7 @@
10421042
},
10431043
{
10441044
"command": "deepnote.notebookeditor.export",
1045-
"group": "Jupyter",
1045+
"group": "Deepnote",
10461046
"when": "notebookType == 'jupyter-notebook' && notebookType != 'deepnote' && isWorkspaceTrusted"
10471047
},
10481048
{
@@ -1158,12 +1158,12 @@
11581158
{
11591159
"when": "resourceLangId == python && !notebookEditorFocused && isWorkspaceTrusted",
11601160
"command": "deepnote.runFileInteractive",
1161-
"group": "Jupyter2"
1161+
"group": "Deepnote2"
11621162
},
11631163
{
11641164
"when": "resourceExtname == .ipynb && isWorkspaceTrusted",
11651165
"command": "deepnote.importnotebookfile",
1166-
"group": "Jupyter"
1166+
"group": "Deepnote"
11671167
}
11681168
],
11691169
"commandPalette": [
@@ -2248,8 +2248,8 @@
22482248
},
22492249
{
22502250
"type": "webview",
2251-
"id": "jupyterViewVariables",
2252-
"name": "Jupyter Variables",
2251+
"id": "deepnoteViewVariables",
2252+
"name": "Deepnote Variables",
22532253
"when": "deepnote.hasNativeNotebookOrInteractiveWindowOpen"
22542254
}
22552255
]
@@ -2289,7 +2289,7 @@
22892289
],
22902290
"languageModelTools": [
22912291
{
2292-
"name": "configure_notebook",
2292+
"name": "configure_deepnote_notebook",
22932293
"displayName": "%deepnote.languageModelTools.configure_notebook.displayName%",
22942294
"modelDescription": "Tool used to configure a Notebook. ALWAYS use this tool before running/executing any Notebook Cells for the first time or before listing/installing packages in Notebooks for the first time. I.e. there is no need to use this tool more than once for the same notebook.",
22952295
"userDescription": "%deepnote.languageModelTools.configure_notebook.userDescription%",
@@ -2318,56 +2318,10 @@
23182318
"when": "workspacePlatform != webworker"
23192319
},
23202320
{
2321-
"name": "configure_python_notebook",
2322-
"displayName": "Start Notebook Kernel",
2323-
"modelDescription": "Selects a Python Kernel and starts it.",
2324-
"tags": [
2325-
"extension_installed_by_tool",
2326-
"install python package",
2327-
"notebooks"
2328-
],
2329-
"inputSchema": {
2330-
"type": "object",
2331-
"properties": {
2332-
"filePath": {
2333-
"description": "The absolute path of the notebook with the active kernel.",
2334-
"type": "string"
2335-
}
2336-
},
2337-
"required": [
2338-
"filePath"
2339-
]
2340-
},
2341-
"when": "false"
2342-
},
2343-
{
2344-
"name": "configure_non_python_notebook",
2345-
"displayName": "Start Notebook Kernel",
2346-
"modelDescription": "Selects the Notebook Kernel and starts it.",
2347-
"tags": [
2348-
"extension_installed_by_tool",
2349-
"jupyter",
2350-
"notebooks"
2351-
],
2352-
"inputSchema": {
2353-
"type": "object",
2354-
"properties": {
2355-
"filePath": {
2356-
"description": "The absolute path of the notebook with the active kernel.",
2357-
"type": "string"
2358-
}
2359-
},
2360-
"required": [
2361-
"filePath"
2362-
]
2363-
},
2364-
"when": "false"
2365-
},
2366-
{
2367-
"name": "notebook_list_packages",
2368-
"displayName": "List Notebook Kernel Packages",
2321+
"name": "deepnote_notebook_list_packages",
2322+
"displayName": "List Deepnote Notebook Kernel Packages",
23692323
"modelDescription": "List the installed packages that are currently available in the selected kernel for a notebook editor. This tool should be used when working with a jupyter notebook with python code cells. Do not use this tool if not already working with a notebook, or for a language other than python. If the tool configure_notebooks exists, then ensure to call configure_notebooks before using this tool.",
2370-
"userDescription": "%deepnote.languageModelTools.notebook_list_packages.userDescription%",
2324+
"userDescription": "%deepnote.languageModelTools.deepnote_notebook_list_packages.userDescription%",
23712325
"toolReferenceName": "listNotebookPackages",
23722326
"tags": [
23732327
"python environment",
@@ -2392,11 +2346,11 @@
23922346
}
23932347
},
23942348
{
2395-
"name": "notebook_install_packages",
2349+
"name": "deepnote_notebook_install_packages",
23962350
"displayName": "Install Packages for Notebook",
23972351
"modelDescription": "Install a list of packages on a notebook kernel to be used within that notebook. This tool should be used when working with a jupyter notebook with python code cells. Do not use this tool if not already working with a notebook, or for a language other than python. If the tool configure_notebooks exists, then ensure to call configure_notebooks before using this tool.",
2398-
"userDescription": "%deepnote.languageModelTools.notebook_install_packages.userDescription%",
2399-
"toolReferenceName": "installNotebookPackages",
2352+
"userDescription": "%deepnote.languageModelTools.deepnote_notebook_install_packages.userDescription%",
2353+
"toolReferenceName": "installDeepnoteNotebookPackages",
24002354
"tags": [
24012355
"python environment",
24022356
"jupyter environment",
@@ -2428,10 +2382,10 @@
24282382
}
24292383
},
24302384
{
2431-
"name": "restart_notebook_kernel",
2432-
"displayName": "Restart Notebook",
2385+
"name": "restart_deepnote_notebook_kernel",
2386+
"displayName": "Restart Deepnote Notebook",
24332387
"modelDescription": "Tool used to restart a Notebook kernel. Some packages require a restart of the kernel after being installed. Use this if after installing a package if you know the package requires a restart, or if still getting an error about a missing package after installing.",
2434-
"toolReferenceName": "restartNotebookKernel",
2388+
"toolReferenceName": "restartDeepnoteNotebookKernel",
24352389
"tags": [
24362390
"extension_installed_by_tool",
24372391
"jupyter",

package.nls.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -241,10 +241,10 @@
241241
"DataScience.installPythonTitle": "Install Python",
242242
"DataScience.installPythonExtensionViaKernelPickerTitle": "Install Python Extension",
243243
"DataScience.switchToRemoteKernelsTitle": "Connect to a Jupyter Server",
244-
"deepnote.languageModelTools.configure_notebook.displayName": "Configure Jupyter Notebook",
245-
"deepnote.languageModelTools.configure_notebook.userDescription": "Ensure Notebook is ready for use, such as running cells.",
246-
"deepnote.languageModelTools.notebook_list_packages.userDescription": "Lists Python packages available in the selected Notebook Kernel.",
247-
"deepnote.languageModelTools.notebook_install_packages.userDescription": "Installs Python packages in the selected Notebook Kernel.",
244+
"deepnote.languageModelTools.configure_deepnote_notebook.displayName": "Configure Deepnote Notebook",
245+
"deepnote.languageModelTools.configure_deepnote_notebook.userDescription": "Ensure Notebook is ready for use, such as running cells.",
246+
"deepnote.languageModelTools.deepnote_notebook_list_packages.userDescription": "Lists Python packages available in the selected Notebook Kernel.",
247+
"deepnote.languageModelTools.deepnote_notebook_install_packages.userDescription": "Installs Python packages in the selected Notebook Kernel.",
248248
"deepnote.notebook.displayName": "Deepnote Notebook",
249249
"deepnote.commands.refreshExplorer.title": "Refresh Explorer",
250250
"deepnote.commands.openNotebook.title": "Open Notebook",

src/commands.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export interface ICommandNameArgumentTypeMapping {
4545
['editor.action.rename']: [];
4646
['deepnote.selectJupyterInterpreter']: [];
4747
['dataScience.ClearUserProviderJupyterServerCache']: [];
48-
['jupyterViewVariables.focus']: [];
48+
['deepnoteViewVariables.focus']: [];
4949
['deepnote.selectLocalJupyterServer']: [] | [undefined | string];
5050
['workbench.action.openSettings']: ['deepnote.kernels.excludePythonEnvironments'];
5151
['deepnote.getUsedAzMLServerHandles']: [];

src/interactive-window/commands/commandRegistry.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,7 @@ export class CommandRegistry implements IDisposable, IExtensionSyncActivationSer
533533
private async openVariableView(): Promise<void> {
534534
// For all contributed views vscode creates a command with the format [view ID].focus to focus that view
535535
// It's the given way to focus a single view so using that here, note that it needs to match the view ID
536-
return commands.executeCommand('jupyterViewVariables.focus');
536+
return commands.executeCommand('deepnoteViewVariables.focus');
537537
}
538538

539539
// Open the VS Code outline view

src/platform/webviews/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export type WebViewViewChangeEventArgs = { current: WebViewViewState; previous:
3535

3636
// Wraps the VS Code WebviewViewProvider. VSC Prefix as we also have our own IWebviewViewProvider
3737
export interface IVSCWebviewViewProvider extends WebviewViewProvider {
38-
readonly viewType: 'jupyterViewVariables';
38+
readonly viewType: 'deepnoteViewVariables';
3939
}
4040

4141
/**

src/standalone/chat/configureNotebook.node.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import { BaseTool, IBaseToolParams, sendConfigureNotebookToolCallTelemetry } fro
2929
import { basename } from '../../platform/vscode-path/resources';
3030

3131
export class ConfigureNotebookTool extends BaseTool<IBaseToolParams> {
32-
public static toolName = 'configure_notebook';
32+
public static toolName = 'configure_deepnote_notebook';
3333
constructor(
3434
private readonly controllerRegistration: IControllerRegistration,
3535
private readonly kernelDependencyService: IKernelDependencyService,

src/standalone/chat/installPackageTool.node.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import { BaseTool, IBaseToolParams } from './helper';
1616
import { WrappedError } from '../../platform/errors/types';
1717

1818
export class InstallPackagesTool extends BaseTool<IInstallPackageParams> {
19-
public static toolName = 'notebook_install_packages';
19+
public static toolName = 'deepnote_notebook_install_packages';
2020
constructor(
2121
private readonly kernelProvider: IKernelProvider,
2222
private readonly controllerRegistration: IControllerRegistration,

src/standalone/chat/listPackageTool.node.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import { BaseTool, IBaseToolParams } from './helper';
1717
import { WrappedError } from '../../platform/errors/types';
1818

1919
export class ListPackageTool extends BaseTool<IBaseToolParams> {
20-
public static toolName = 'notebook_list_packages';
20+
public static toolName = 'deepnote_notebook_list_packages';
2121
constructor(
2222
private readonly kernelProvider: IKernelProvider,
2323
private readonly controllerRegistration: IControllerRegistration

src/standalone/chat/restartKernelTool.node.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ interface RestartKernelToolParams extends IBaseToolParams {
1515
}
1616

1717
export class RestartKernelTool extends BaseTool<RestartKernelToolParams> {
18-
public static toolName = 'restart_notebook_kernel';
18+
public static toolName = 'restart_deepnote_notebook_kernel';
1919

2020
constructor(
2121
private readonly kernelProvider: IKernelProvider,
@@ -44,7 +44,7 @@ export class RestartKernelTool extends BaseTool<RestartKernelToolParams> {
4444
const kernel = this.kernelProvider.get(notebook);
4545
if (!controller || !kernel || !hasKernelStartedOrIsStarting(kernel)) {
4646
throw new WrappedError(
47-
`No active kernel for notebook ${options.input.filePath}, the configure_notebook tool can be used to help the user select a kernel.`,
47+
`No active kernel for notebook ${options.input.filePath}, the configure_deepnote_notebook tool can be used to help the user select a kernel.`,
4848
undefined,
4949
'noActiveKernel'
5050
);

src/webviews/extension-side/variablesView/variableViewProvider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import { DataViewerDelegator } from '../dataviewer/dataViewerDelegator';
1515
// This class creates our UI for our variable view and links it to the vs code webview view
1616
@injectable()
1717
export class VariableViewProvider implements IVariableViewProvider {
18-
public readonly viewType = 'jupyterViewVariables';
18+
public readonly viewType = 'deepnoteViewVariables';
1919

2020
// Either return the active variable view or wait until it's created and return it
2121
// @ts-ignore Property will be accessed in test code via casting to ITestVariableViewProviderInterface

0 commit comments

Comments
 (0)