Skip to content

Commit 76a26b4

Browse files
committed
fix: react to external notebook changes
1 parent 8296452 commit 76a26b4

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/notebooks/deepnote/sqlCellStatusBarProvider.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import {
44
NotebookCell,
55
NotebookCellStatusBarItem,
66
NotebookCellStatusBarItemProvider,
7+
NotebookDocumentChangeEvent,
78
NotebookEdit,
89
ProviderResult,
910
QuickPickItem,
@@ -55,6 +56,15 @@ export class SqlCellStatusBarProvider implements NotebookCellStatusBarItemProvid
5556
})
5657
);
5758

59+
// Refresh when any Deepnote notebook changes (e.g., metadata updated externally)
60+
this.disposables.push(
61+
workspace.onDidChangeNotebookDocument((e: NotebookDocumentChangeEvent) => {
62+
if (e.notebook.notebookType === 'deepnote') {
63+
this._onDidChangeCellStatusBarItems.fire();
64+
}
65+
})
66+
);
67+
5868
// Register command to update SQL variable name
5969
this.disposables.push(
6070
commands.registerCommand('deepnote.updateSqlVariableName', async (cell?: NotebookCell) => {

0 commit comments

Comments
 (0)