jupyterlab_claude_code_extension 1.2.21 → 1.2.22

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.d.ts CHANGED
@@ -121,12 +121,14 @@ export declare class ClaudeCodeSessionsWidget extends Widget {
121
121
  /** Fork the active row's current conversation into a new named branch.
122
122
  *
123
123
  * Asks for a name, then launches a terminal running
124
- * ``claude --resume <current> --fork-session --session-id <new uuid>`` -
125
- * the uuid is generated here so the forked JSONL is known up front. Once
126
- * claude materialises the file (polled via sessions/set-title) the chosen
127
- * name is stamped as a custom-title record. The fork is the newest JSONL,
128
- * so the recency resolution makes it the row's current conversation
129
- * without an explicit switch.
124
+ * ``claude --resume <current> --fork-session --session-id <new uuid> -n <name>`` -
125
+ * the uuid is generated here so the forked JSONL is known up front, and
126
+ * ``-n`` makes claude own the name: it writes the chosen name as a
127
+ * custom-title record on its first turn and re-stamps it every turn, so
128
+ * it sticks even though the fork inherits the parent's title. The fork is
129
+ * the newest JSONL, so recency resolution makes it the row's current
130
+ * conversation without an explicit switch. ``_stampForkTitle`` still runs
131
+ * to seed the title and refresh the row promptly while claude starts.
130
132
  */
131
133
  private _branchSession;
132
134
  /** Retry sessions/set-title until the forked JSONL exists (404 while it
package/lib/widget.js CHANGED
@@ -1442,12 +1442,14 @@ export class ClaudeCodeSessionsWidget extends Widget {
1442
1442
  /** Fork the active row's current conversation into a new named branch.
1443
1443
  *
1444
1444
  * Asks for a name, then launches a terminal running
1445
- * ``claude --resume <current> --fork-session --session-id <new uuid>`` -
1446
- * the uuid is generated here so the forked JSONL is known up front. Once
1447
- * claude materialises the file (polled via sessions/set-title) the chosen
1448
- * name is stamped as a custom-title record. The fork is the newest JSONL,
1449
- * so the recency resolution makes it the row's current conversation
1450
- * without an explicit switch.
1445
+ * ``claude --resume <current> --fork-session --session-id <new uuid> -n <name>`` -
1446
+ * the uuid is generated here so the forked JSONL is known up front, and
1447
+ * ``-n`` makes claude own the name: it writes the chosen name as a
1448
+ * custom-title record on its first turn and re-stamps it every turn, so
1449
+ * it sticks even though the fork inherits the parent's title. The fork is
1450
+ * the newest JSONL, so recency resolution makes it the row's current
1451
+ * conversation without an explicit switch. ``_stampForkTitle`` still runs
1452
+ * to seed the title and refresh the row promptly while claude starts.
1451
1453
  */
1452
1454
  async _branchSession(forceDangerous) {
1453
1455
  const session = this._activeSession;
@@ -1472,6 +1474,7 @@ export class ClaudeCodeSessionsWidget extends Widget {
1472
1474
  project_path: session.project_path,
1473
1475
  session_id: session.session_id,
1474
1476
  fork_session_id: forkId,
1477
+ name: title,
1475
1478
  dangerously_skip_permissions: forceDangerous || this._dangerouslySkip
1476
1479
  })
1477
1480
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jupyterlab_claude_code_extension",
3
- "version": "1.2.21",
3
+ "version": "1.2.22",
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",
@@ -378,6 +378,8 @@ describe('launch spinner dismiss contract', () => {
378
378
  expect(branch).toMatch(/UUID\.uuid4\(\)/);
379
379
  expect(branch).toMatch(/fork_session_id: forkId/);
380
380
  expect(branch).toMatch(/session_id: session\.session_id/);
381
+ // The name is forced at launch (claude -n <name>) so it sticks.
382
+ expect(branch).toMatch(/name: title/);
381
383
  expect(branch).toMatch(/_stampForkTitle/);
382
384
  });
383
385
 
package/src/widget.ts CHANGED
@@ -1671,12 +1671,14 @@ export class ClaudeCodeSessionsWidget extends Widget {
1671
1671
  /** Fork the active row's current conversation into a new named branch.
1672
1672
  *
1673
1673
  * Asks for a name, then launches a terminal running
1674
- * ``claude --resume <current> --fork-session --session-id <new uuid>`` -
1675
- * the uuid is generated here so the forked JSONL is known up front. Once
1676
- * claude materialises the file (polled via sessions/set-title) the chosen
1677
- * name is stamped as a custom-title record. The fork is the newest JSONL,
1678
- * so the recency resolution makes it the row's current conversation
1679
- * without an explicit switch.
1674
+ * ``claude --resume <current> --fork-session --session-id <new uuid> -n <name>`` -
1675
+ * the uuid is generated here so the forked JSONL is known up front, and
1676
+ * ``-n`` makes claude own the name: it writes the chosen name as a
1677
+ * custom-title record on its first turn and re-stamps it every turn, so
1678
+ * it sticks even though the fork inherits the parent's title. The fork is
1679
+ * the newest JSONL, so recency resolution makes it the row's current
1680
+ * conversation without an explicit switch. ``_stampForkTitle`` still runs
1681
+ * to seed the title and refresh the row promptly while claude starts.
1680
1682
  */
1681
1683
  private async _branchSession(forceDangerous: boolean): Promise<void> {
1682
1684
  const session = this._activeSession;
@@ -1704,6 +1706,7 @@ export class ClaudeCodeSessionsWidget extends Widget {
1704
1706
  project_path: session.project_path,
1705
1707
  session_id: session.session_id,
1706
1708
  fork_session_id: forkId,
1709
+ name: title,
1707
1710
  dangerously_skip_permissions:
1708
1711
  forceDangerous || this._dangerouslySkip
1709
1712
  })