jupyterlab_claude_code_extension 1.2.43 → 1.2.44
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/widget.js +17 -9
- package/package.json +1 -1
- package/src/widget.ts +17 -9
package/lib/widget.js
CHANGED
|
@@ -838,9 +838,11 @@ export class ClaudeCodeSessionsWidget extends Widget {
|
|
|
838
838
|
body,
|
|
839
839
|
buttons: []
|
|
840
840
|
});
|
|
841
|
-
// launch() returns a Promise we don't await -
|
|
842
|
-
// when the spawn completes
|
|
843
|
-
|
|
841
|
+
// launch() returns a Promise we don't await - the caller dismisses this
|
|
842
|
+
// dialog with .dispose() when the spawn completes. Disposing an open Lumino
|
|
843
|
+
// dialog rejects that promise with `undefined`, so catch it here to keep a
|
|
844
|
+
// benign teardown from surfacing as an unhandled promise rejection.
|
|
845
|
+
dialog.launch().catch(() => undefined);
|
|
844
846
|
return dialog;
|
|
845
847
|
}
|
|
846
848
|
_wireTerminalDisposal(projectPath, widget) {
|
|
@@ -1242,7 +1244,9 @@ export class ClaudeCodeSessionsWidget extends Widget {
|
|
|
1242
1244
|
Notification.warning('Folder is outside the JupyterLab root - cannot open a terminal there.', { autoClose: 4000 });
|
|
1243
1245
|
return;
|
|
1244
1246
|
}
|
|
1245
|
-
|
|
1247
|
+
this._app.commands
|
|
1248
|
+
.execute('terminal:create-new', { cwd: rel })
|
|
1249
|
+
.catch(err => this._showError(err));
|
|
1246
1250
|
}
|
|
1247
1251
|
});
|
|
1248
1252
|
this._commands.addCommand('claude-code-sessions:show-in-filebrowser', {
|
|
@@ -1261,9 +1265,9 @@ export class ClaudeCodeSessionsWidget extends Widget {
|
|
|
1261
1265
|
}
|
|
1262
1266
|
// JL's built-in command navigates the default file browser to the
|
|
1263
1267
|
// path and reveals the browser panel.
|
|
1264
|
-
|
|
1265
|
-
path: rel
|
|
1266
|
-
|
|
1268
|
+
this._app.commands
|
|
1269
|
+
.execute('filebrowser:go-to-path', { path: rel })
|
|
1270
|
+
.catch(err => this._showError(err));
|
|
1267
1271
|
}
|
|
1268
1272
|
});
|
|
1269
1273
|
this._commands.addCommand('claude-code-sessions:copy-path', {
|
|
@@ -1831,7 +1835,9 @@ export class ClaudeCodeSessionsWidget extends Widget {
|
|
|
1831
1835
|
});
|
|
1832
1836
|
render();
|
|
1833
1837
|
updateControls();
|
|
1834
|
-
|
|
1838
|
+
// dialog.dispose() (on open/switch) rejects this promise with `undefined`;
|
|
1839
|
+
// catch it so the teardown never surfaces as an unhandled promise rejection.
|
|
1840
|
+
dialog.launch().catch(() => undefined);
|
|
1835
1841
|
search.focus();
|
|
1836
1842
|
}
|
|
1837
1843
|
/** Delete the given branch sessions of the active row's project.
|
|
@@ -1961,7 +1967,9 @@ export class ClaudeCodeSessionsWidget extends Widget {
|
|
|
1961
1967
|
: `Branch switch failed: ${err}`, { autoClose: 4000 });
|
|
1962
1968
|
}
|
|
1963
1969
|
finally {
|
|
1964
|
-
|
|
1970
|
+
// Best-effort refresh - never let a transient fetch failure reject this
|
|
1971
|
+
// fire-and-forget switch (its callers do not await it).
|
|
1972
|
+
await this._fetch().catch(() => undefined);
|
|
1965
1973
|
}
|
|
1966
1974
|
}
|
|
1967
1975
|
/** Open a specific conversation branch in its own terminal.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jupyterlab_claude_code_extension",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.44",
|
|
4
4
|
"description": "Browse, resume, and manage your Claude Code CLI sessions from a JupyterLab side panel. One click reactivates the right terminal - no duplicate tabs, live remote-control indicator, and favourites for the projects you keep coming back to.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"jupyter",
|
package/src/widget.ts
CHANGED
|
@@ -990,9 +990,11 @@ export class ClaudeCodeSessionsWidget extends Widget {
|
|
|
990
990
|
body,
|
|
991
991
|
buttons: []
|
|
992
992
|
});
|
|
993
|
-
// launch() returns a Promise we don't await -
|
|
994
|
-
// when the spawn completes
|
|
995
|
-
|
|
993
|
+
// launch() returns a Promise we don't await - the caller dismisses this
|
|
994
|
+
// dialog with .dispose() when the spawn completes. Disposing an open Lumino
|
|
995
|
+
// dialog rejects that promise with `undefined`, so catch it here to keep a
|
|
996
|
+
// benign teardown from surfacing as an unhandled promise rejection.
|
|
997
|
+
dialog.launch().catch(() => undefined);
|
|
996
998
|
return dialog;
|
|
997
999
|
}
|
|
998
1000
|
|
|
@@ -1440,7 +1442,9 @@ export class ClaudeCodeSessionsWidget extends Widget {
|
|
|
1440
1442
|
);
|
|
1441
1443
|
return;
|
|
1442
1444
|
}
|
|
1443
|
-
|
|
1445
|
+
this._app.commands
|
|
1446
|
+
.execute('terminal:create-new', { cwd: rel })
|
|
1447
|
+
.catch(err => this._showError(err));
|
|
1444
1448
|
}
|
|
1445
1449
|
});
|
|
1446
1450
|
|
|
@@ -1463,9 +1467,9 @@ export class ClaudeCodeSessionsWidget extends Widget {
|
|
|
1463
1467
|
}
|
|
1464
1468
|
// JL's built-in command navigates the default file browser to the
|
|
1465
1469
|
// path and reveals the browser panel.
|
|
1466
|
-
|
|
1467
|
-
path: rel
|
|
1468
|
-
|
|
1470
|
+
this._app.commands
|
|
1471
|
+
.execute('filebrowser:go-to-path', { path: rel })
|
|
1472
|
+
.catch(err => this._showError(err));
|
|
1469
1473
|
}
|
|
1470
1474
|
});
|
|
1471
1475
|
|
|
@@ -2093,7 +2097,9 @@ export class ClaudeCodeSessionsWidget extends Widget {
|
|
|
2093
2097
|
render();
|
|
2094
2098
|
updateControls();
|
|
2095
2099
|
|
|
2096
|
-
|
|
2100
|
+
// dialog.dispose() (on open/switch) rejects this promise with `undefined`;
|
|
2101
|
+
// catch it so the teardown never surfaces as an unhandled promise rejection.
|
|
2102
|
+
dialog.launch().catch(() => undefined);
|
|
2097
2103
|
search.focus();
|
|
2098
2104
|
}
|
|
2099
2105
|
|
|
@@ -2240,7 +2246,9 @@ export class ClaudeCodeSessionsWidget extends Widget {
|
|
|
2240
2246
|
{ autoClose: 4000 }
|
|
2241
2247
|
);
|
|
2242
2248
|
} finally {
|
|
2243
|
-
|
|
2249
|
+
// Best-effort refresh - never let a transient fetch failure reject this
|
|
2250
|
+
// fire-and-forget switch (its callers do not await it).
|
|
2251
|
+
await this._fetch().catch(() => undefined);
|
|
2244
2252
|
}
|
|
2245
2253
|
}
|
|
2246
2254
|
|