jupyterlab_claude_code_extension 1.0.41 → 1.0.45

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 CHANGED
@@ -378,6 +378,12 @@ export class ClaudeCodeSessionsWidget extends Widget {
378
378
  }
379
379
  try {
380
380
  const data = await requestAPI(`terminal-cwd/${encodeURIComponent(sessName)}`, this._serverSettings);
381
+ // Only reuse terminals that actually have claude running. Otherwise
382
+ // a plain bash opened at the project cwd would be matched and
383
+ // activated, swallowing the resume click without spawning claude.
384
+ if (!(data === null || data === void 0 ? void 0 : data.has_claude)) {
385
+ continue;
386
+ }
381
387
  const cwds = Array.isArray(data === null || data === void 0 ? void 0 : data.cwds) ? data.cwds : [];
382
388
  for (const cwd of cwds) {
383
389
  if ((cwd || '').replace(/\/+$/, '') === target) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jupyterlab_claude_code_extension",
3
- "version": "1.0.41",
3
+ "version": "1.0.45",
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
@@ -78,6 +78,7 @@ function saveExpanded(state: Record<SectionKey, boolean>): void {
78
78
  interface ITerminalCwdResponse {
79
79
  terminal_name: string;
80
80
  cwds: string[];
81
+ has_claude: boolean;
81
82
  }
82
83
 
83
84
  // Drop any pre-v0.6.18 localStorage entries from previous schemes - they
@@ -461,6 +462,12 @@ export class ClaudeCodeSessionsWidget extends Widget {
461
462
  `terminal-cwd/${encodeURIComponent(sessName)}`,
462
463
  this._serverSettings
463
464
  );
465
+ // Only reuse terminals that actually have claude running. Otherwise
466
+ // a plain bash opened at the project cwd would be matched and
467
+ // activated, swallowing the resume click without spawning claude.
468
+ if (!data?.has_claude) {
469
+ continue;
470
+ }
464
471
  const cwds = Array.isArray(data?.cwds) ? data.cwds : [];
465
472
  for (const cwd of cwds) {
466
473
  if ((cwd || '').replace(/\/+$/, '') === target) {