jupyterlab_claude_code_extension 1.0.58 → 1.0.59
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 +32 -1
- package/package.json +1 -1
- package/src/widget.ts +39 -1
package/lib/widget.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { Dialog, showDialog } from '@jupyterlab/apputils';
|
|
1
|
+
import { Clipboard, Dialog, Notification, showDialog } from '@jupyterlab/apputils';
|
|
2
|
+
import { terminalIcon } from '@jupyterlab/ui-components';
|
|
2
3
|
import { CommandRegistry } from '@lumino/commands';
|
|
3
4
|
import { Menu, Widget } from '@lumino/widgets';
|
|
4
5
|
import { requestAPI } from './request';
|
|
@@ -812,6 +813,32 @@ export class ClaudeCodeSessionsWidget extends Widget {
|
|
|
812
813
|
}
|
|
813
814
|
}
|
|
814
815
|
});
|
|
816
|
+
this._commands.addCommand('claude-code-sessions:open-terminal', {
|
|
817
|
+
label: 'Open Terminal',
|
|
818
|
+
icon: terminalIcon,
|
|
819
|
+
execute: () => {
|
|
820
|
+
if (!this._activeSession) {
|
|
821
|
+
return;
|
|
822
|
+
}
|
|
823
|
+
// JupyterLab's built-in command - spawns a fresh pty with the user's
|
|
824
|
+
// shell at the given cwd. No claude, no waiter wrapper, no reuse;
|
|
825
|
+
// for when the user wants a plain shell at the project folder.
|
|
826
|
+
void this._app.commands.execute('terminal:create-new', {
|
|
827
|
+
cwd: this._activeSession.project_path
|
|
828
|
+
});
|
|
829
|
+
}
|
|
830
|
+
});
|
|
831
|
+
this._commands.addCommand('claude-code-sessions:copy-path', {
|
|
832
|
+
label: 'Copy Path',
|
|
833
|
+
execute: () => {
|
|
834
|
+
if (!this._activeSession) {
|
|
835
|
+
return;
|
|
836
|
+
}
|
|
837
|
+
const path = this._activeSession.project_path;
|
|
838
|
+
Clipboard.copyToSystem(path);
|
|
839
|
+
Notification.success(`Copied: ${path}`, { autoClose: 2000 });
|
|
840
|
+
}
|
|
841
|
+
});
|
|
815
842
|
this._commands.addCommand('claude-code-sessions:remove', {
|
|
816
843
|
label: 'Remove from Claude',
|
|
817
844
|
icon: removeIcon,
|
|
@@ -827,9 +854,13 @@ export class ClaudeCodeSessionsWidget extends Widget {
|
|
|
827
854
|
this._contextMenu.addItem({
|
|
828
855
|
command: 'claude-code-sessions:resume-dangerous'
|
|
829
856
|
});
|
|
857
|
+
this._contextMenu.addItem({
|
|
858
|
+
command: 'claude-code-sessions:open-terminal'
|
|
859
|
+
});
|
|
830
860
|
this._contextMenu.addItem({
|
|
831
861
|
command: 'claude-code-sessions:toggle-favourite'
|
|
832
862
|
});
|
|
863
|
+
this._contextMenu.addItem({ command: 'claude-code-sessions:copy-path' });
|
|
833
864
|
this._contextMenu.addItem({ type: 'separator' });
|
|
834
865
|
this._contextMenu.addItem({ command: 'claude-code-sessions:remove' });
|
|
835
866
|
this._contextMenu.aboutToClose.connect(() => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jupyterlab_claude_code_extension",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.59",
|
|
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
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import { JupyterFrontEnd } from '@jupyterlab/application';
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
Clipboard,
|
|
4
|
+
Dialog,
|
|
5
|
+
Notification,
|
|
6
|
+
showDialog
|
|
7
|
+
} from '@jupyterlab/apputils';
|
|
3
8
|
import { ServerConnection } from '@jupyterlab/services';
|
|
4
9
|
import { ITerminalTracker } from '@jupyterlab/terminal';
|
|
10
|
+
import { terminalIcon } from '@jupyterlab/ui-components';
|
|
5
11
|
import { CommandRegistry } from '@lumino/commands';
|
|
6
12
|
import { Menu, Widget } from '@lumino/widgets';
|
|
7
13
|
import { Message } from '@lumino/messaging';
|
|
@@ -947,6 +953,34 @@ export class ClaudeCodeSessionsWidget extends Widget {
|
|
|
947
953
|
}
|
|
948
954
|
});
|
|
949
955
|
|
|
956
|
+
this._commands.addCommand('claude-code-sessions:open-terminal', {
|
|
957
|
+
label: 'Open Terminal',
|
|
958
|
+
icon: terminalIcon,
|
|
959
|
+
execute: () => {
|
|
960
|
+
if (!this._activeSession) {
|
|
961
|
+
return;
|
|
962
|
+
}
|
|
963
|
+
// JupyterLab's built-in command - spawns a fresh pty with the user's
|
|
964
|
+
// shell at the given cwd. No claude, no waiter wrapper, no reuse;
|
|
965
|
+
// for when the user wants a plain shell at the project folder.
|
|
966
|
+
void this._app.commands.execute('terminal:create-new', {
|
|
967
|
+
cwd: this._activeSession.project_path
|
|
968
|
+
});
|
|
969
|
+
}
|
|
970
|
+
});
|
|
971
|
+
|
|
972
|
+
this._commands.addCommand('claude-code-sessions:copy-path', {
|
|
973
|
+
label: 'Copy Path',
|
|
974
|
+
execute: () => {
|
|
975
|
+
if (!this._activeSession) {
|
|
976
|
+
return;
|
|
977
|
+
}
|
|
978
|
+
const path = this._activeSession.project_path;
|
|
979
|
+
Clipboard.copyToSystem(path);
|
|
980
|
+
Notification.success(`Copied: ${path}`, { autoClose: 2000 });
|
|
981
|
+
}
|
|
982
|
+
});
|
|
983
|
+
|
|
950
984
|
this._commands.addCommand('claude-code-sessions:remove', {
|
|
951
985
|
label: 'Remove from Claude',
|
|
952
986
|
icon: removeIcon,
|
|
@@ -963,9 +997,13 @@ export class ClaudeCodeSessionsWidget extends Widget {
|
|
|
963
997
|
this._contextMenu.addItem({
|
|
964
998
|
command: 'claude-code-sessions:resume-dangerous'
|
|
965
999
|
});
|
|
1000
|
+
this._contextMenu.addItem({
|
|
1001
|
+
command: 'claude-code-sessions:open-terminal'
|
|
1002
|
+
});
|
|
966
1003
|
this._contextMenu.addItem({
|
|
967
1004
|
command: 'claude-code-sessions:toggle-favourite'
|
|
968
1005
|
});
|
|
1006
|
+
this._contextMenu.addItem({ command: 'claude-code-sessions:copy-path' });
|
|
969
1007
|
this._contextMenu.addItem({ type: 'separator' });
|
|
970
1008
|
this._contextMenu.addItem({ command: 'claude-code-sessions:remove' });
|
|
971
1009
|
|