Skip to content

Commit 3b257ba

Browse files
committed
feat: Add support for project notebook management (create, rename, delete)
Signed-off-by: Tomas Kislan <[email protected]>
1 parent 1d9eed4 commit 3b257ba

File tree

5 files changed

+609
-1
lines changed

5 files changed

+609
-1
lines changed

package.json

Lines changed: 78 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,48 @@
175175
"category": "Deepnote",
176176
"icon": "$(add)"
177177
},
178+
{
179+
"command": "deepnote.newNotebook",
180+
"title": "%deepnote.commands.newNotebook.title%",
181+
"category": "Deepnote",
182+
"icon": "$(notebook)"
183+
},
184+
{
185+
"command": "deepnote.renameProject",
186+
"title": "Rename Project",
187+
"category": "Deepnote",
188+
"icon": "$(edit)"
189+
},
190+
{
191+
"command": "deepnote.deleteProject",
192+
"title": "Delete Project",
193+
"category": "Deepnote",
194+
"icon": "$(trash)"
195+
},
196+
{
197+
"command": "deepnote.renameNotebook",
198+
"title": "Rename Notebook",
199+
"category": "Deepnote",
200+
"icon": "$(edit)"
201+
},
202+
{
203+
"command": "deepnote.deleteNotebook",
204+
"title": "Delete Notebook",
205+
"category": "Deepnote",
206+
"icon": "$(trash)"
207+
},
208+
{
209+
"command": "deepnote.duplicateNotebook",
210+
"title": "Duplicate Notebook",
211+
"category": "Deepnote",
212+
"icon": "$(copy)"
213+
},
214+
{
215+
"command": "deepnote.addNotebookToProject",
216+
"title": "Add Notebook",
217+
"category": "Deepnote",
218+
"icon": "$(add)"
219+
},
178220
{
179221
"command": "dataScience.ClearCache",
180222
"title": "%jupyter.command.dataScience.clearCache.title%",
@@ -803,10 +845,15 @@
803845
"when": "notebookType == 'deepnote'"
804846
},
805847
{
806-
"command": "deepnote.addSqlBlock",
848+
"command": "deepnote.newNotebook",
807849
"group": "navigation@1",
808850
"when": "notebookType == 'deepnote'"
809851
},
852+
{
853+
"command": "deepnote.addSqlBlock",
854+
"group": "navigation@2",
855+
"when": "notebookType == 'deepnote'"
856+
},
810857
{
811858
"command": "jupyter.restartkernel",
812859
"group": "navigation/execute@5",
@@ -1331,6 +1378,36 @@
13311378
"command": "deepnote.revealInExplorer",
13321379
"when": "view == deepnoteExplorer",
13331380
"group": "inline@2"
1381+
},
1382+
{
1383+
"command": "deepnote.addNotebookToProject",
1384+
"when": "view == deepnoteExplorer && viewItem == projectFile",
1385+
"group": "1_project@1"
1386+
},
1387+
{
1388+
"command": "deepnote.renameProject",
1389+
"when": "view == deepnoteExplorer && viewItem == projectFile",
1390+
"group": "2_edit@1"
1391+
},
1392+
{
1393+
"command": "deepnote.deleteProject",
1394+
"when": "view == deepnoteExplorer && viewItem == projectFile",
1395+
"group": "3_delete@1"
1396+
},
1397+
{
1398+
"command": "deepnote.renameNotebook",
1399+
"when": "view == deepnoteExplorer && viewItem == notebook",
1400+
"group": "2_edit@1"
1401+
},
1402+
{
1403+
"command": "deepnote.duplicateNotebook",
1404+
"when": "view == deepnoteExplorer && viewItem == notebook",
1405+
"group": "2_edit@2"
1406+
},
1407+
{
1408+
"command": "deepnote.deleteNotebook",
1409+
"when": "view == deepnoteExplorer && viewItem == notebook",
1410+
"group": "3_delete@1"
13341411
}
13351412
]
13361413
},

package.nls.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,7 @@
264264
"deepnote.commands.addInputDateRangeBlock.title": "Add Input Date Range Block",
265265
"deepnote.commands.addInputFileBlock.title": "Add Input File Block",
266266
"deepnote.commands.addButtonBlock.title": "Add Button Block",
267+
"deepnote.commands.newNotebook.title": "New Notebook",
267268
"deepnote.views.explorer.name": "Explorer",
268269
"deepnote.views.explorer.welcome": "No Deepnote notebooks found in this workspace.",
269270
"deepnote.command.selectNotebook.title": "Select Notebook"

src/commands.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,4 +187,5 @@ export interface ICommandNameArgumentTypeMapping {
187187
[DSCommands.ContinueEditSessionInCodespace]: [];
188188
[DSCommands.AddSqlBlock]: [];
189189
[DSCommands.AddBigNumberChartBlock]: [];
190+
[DSCommands.NewNotebook]: [];
190191
}

0 commit comments

Comments
 (0)