@plmbr/notebook-intelligence 5.0.0
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/LICENSE +674 -0
- package/README.md +412 -0
- package/lib/api.d.ts +288 -0
- package/lib/api.js +927 -0
- package/lib/cell-output-bundle.d.ts +25 -0
- package/lib/cell-output-bundle.js +129 -0
- package/lib/cell-output-toolbar.d.ts +26 -0
- package/lib/cell-output-toolbar.js +188 -0
- package/lib/chat-progress-feedback.d.ts +3 -0
- package/lib/chat-progress-feedback.js +27 -0
- package/lib/chat-sidebar.d.ts +92 -0
- package/lib/chat-sidebar.js +3452 -0
- package/lib/command-ids.d.ts +39 -0
- package/lib/command-ids.js +44 -0
- package/lib/components/ask-user-question.d.ts +2 -0
- package/lib/components/ask-user-question.js +85 -0
- package/lib/components/checkbox.d.ts +2 -0
- package/lib/components/checkbox.js +30 -0
- package/lib/components/claude-mcp-panel.d.ts +2 -0
- package/lib/components/claude-mcp-panel.js +275 -0
- package/lib/components/claude-mcp-paste.d.ts +7 -0
- package/lib/components/claude-mcp-paste.js +104 -0
- package/lib/components/claude-session-picker.d.ts +8 -0
- package/lib/components/claude-session-picker.js +127 -0
- package/lib/components/form-dialog.d.ts +25 -0
- package/lib/components/form-dialog.js +35 -0
- package/lib/components/launcher-picker.d.ts +6 -0
- package/lib/components/launcher-picker.js +135 -0
- package/lib/components/mcp-util.d.ts +2 -0
- package/lib/components/mcp-util.js +37 -0
- package/lib/components/notebook-generation-popover.d.ts +7 -0
- package/lib/components/notebook-generation-popover.js +60 -0
- package/lib/components/pill.d.ts +2 -0
- package/lib/components/pill.js +5 -0
- package/lib/components/plugins-panel.d.ts +3 -0
- package/lib/components/plugins-panel.js +466 -0
- package/lib/components/settings-panel.d.ts +11 -0
- package/lib/components/settings-panel.js +742 -0
- package/lib/components/skills-panel.d.ts +2 -0
- package/lib/components/skills-panel.js +1264 -0
- package/lib/handler.d.ts +8 -0
- package/lib/handler.js +36 -0
- package/lib/icons.d.ts +45 -0
- package/lib/icons.js +54 -0
- package/lib/index.d.ts +8 -0
- package/lib/index.js +2079 -0
- package/lib/markdown-renderer.d.ts +10 -0
- package/lib/markdown-renderer.js +64 -0
- package/lib/notebook-generation-toolbar.d.ts +16 -0
- package/lib/notebook-generation-toolbar.js +197 -0
- package/lib/notebook-generation.d.ts +8 -0
- package/lib/notebook-generation.js +12 -0
- package/lib/open-file-refresh-watcher-env.d.ts +4 -0
- package/lib/open-file-refresh-watcher-env.js +33 -0
- package/lib/open-file-refresh-watcher.d.ts +97 -0
- package/lib/open-file-refresh-watcher.js +190 -0
- package/lib/shell-utils.d.ts +6 -0
- package/lib/shell-utils.js +9 -0
- package/lib/task-target-notebook.d.ts +2 -0
- package/lib/task-target-notebook.js +28 -0
- package/lib/terminal-drag-format.d.ts +9 -0
- package/lib/terminal-drag-format.js +23 -0
- package/lib/terminal-drag.d.ts +12 -0
- package/lib/terminal-drag.js +268 -0
- package/lib/tokens.d.ts +149 -0
- package/lib/tokens.js +88 -0
- package/lib/tour/tour-anchors.d.ts +18 -0
- package/lib/tour/tour-anchors.js +18 -0
- package/lib/tour/tour-config.d.ts +66 -0
- package/lib/tour/tour-config.js +99 -0
- package/lib/tour/tour-defaults.json +58 -0
- package/lib/tour/tour-events.d.ts +19 -0
- package/lib/tour/tour-events.js +30 -0
- package/lib/tour/tour-overlay.d.ts +6 -0
- package/lib/tour/tour-overlay.js +350 -0
- package/lib/tour/tour-state.d.ts +20 -0
- package/lib/tour/tour-state.js +81 -0
- package/lib/tour/tour-steps.d.ts +33 -0
- package/lib/tour/tour-steps.js +216 -0
- package/lib/utils.d.ts +53 -0
- package/lib/utils.js +385 -0
- package/package.json +258 -0
- package/schema/plugin.json +42 -0
- package/src/api.ts +1424 -0
- package/src/cell-output-bundle.ts +176 -0
- package/src/cell-output-toolbar.ts +232 -0
- package/src/chat-progress-feedback.ts +35 -0
- package/src/chat-sidebar.tsx +5147 -0
- package/src/command-ids.ts +67 -0
- package/src/components/ask-user-question.tsx +151 -0
- package/src/components/checkbox.tsx +62 -0
- package/src/components/claude-mcp-panel.tsx +543 -0
- package/src/components/claude-mcp-paste.ts +132 -0
- package/src/components/claude-session-picker.tsx +214 -0
- package/src/components/form-dialog.tsx +75 -0
- package/src/components/launcher-picker.tsx +237 -0
- package/src/components/mcp-util.ts +53 -0
- package/src/components/notebook-generation-popover.tsx +127 -0
- package/src/components/pill.tsx +15 -0
- package/src/components/plugins-panel.tsx +774 -0
- package/src/components/settings-panel.tsx +1631 -0
- package/src/components/skills-panel.tsx +2084 -0
- package/src/handler.ts +51 -0
- package/src/icons.ts +71 -0
- package/src/index.ts +2583 -0
- package/src/markdown-renderer.tsx +153 -0
- package/src/notebook-generation-toolbar.tsx +281 -0
- package/src/notebook-generation.ts +23 -0
- package/src/open-file-refresh-watcher-env.ts +52 -0
- package/src/open-file-refresh-watcher.ts +260 -0
- package/src/shell-utils.ts +10 -0
- package/src/svg.d.ts +4 -0
- package/src/task-target-notebook.ts +37 -0
- package/src/terminal-drag-format.ts +29 -0
- package/src/terminal-drag.ts +382 -0
- package/src/tokens.ts +171 -0
- package/src/tour/tour-anchors.ts +21 -0
- package/src/tour/tour-config.ts +160 -0
- package/src/tour/tour-events.ts +34 -0
- package/src/tour/tour-overlay.tsx +474 -0
- package/src/tour/tour-state.ts +87 -0
- package/src/tour/tour-steps.ts +281 -0
- package/src/utils.ts +455 -0
- package/style/base.css +3238 -0
- package/style/icons/cell-toolbar-bug.svg +5 -0
- package/style/icons/cell-toolbar-chat.svg +5 -0
- package/style/icons/cell-toolbar-sparkle.svg +5 -0
- package/style/icons/claude.svg +1 -0
- package/style/icons/copilot-warning.svg +1 -0
- package/style/icons/copilot.svg +1 -0
- package/style/icons/copy.svg +1 -0
- package/style/icons/openai.svg +1 -0
- package/style/icons/opencode.svg +1 -0
- package/style/icons/sparkles-warning.svg +5 -0
- package/style/icons/sparkles.svg +1 -0
- package/style/index.css +1 -0
- package/style/index.js +1 -0
package/lib/handler.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Call the API extension
|
|
3
|
+
*
|
|
4
|
+
* @param endPoint API REST end point for the extension
|
|
5
|
+
* @param init Initial values for the request
|
|
6
|
+
* @returns The response body interpreted as JSON
|
|
7
|
+
*/
|
|
8
|
+
export declare function requestAPI<T>(endPoint?: string, init?: RequestInit): Promise<T>;
|
package/lib/handler.js
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
// Copyright (c) Mehmet Bektas <mbektasgh@outlook.com>
|
|
2
|
+
import { URLExt } from '@jupyterlab/coreutils';
|
|
3
|
+
import { ServerConnection } from '@jupyterlab/services';
|
|
4
|
+
/**
|
|
5
|
+
* Call the API extension
|
|
6
|
+
*
|
|
7
|
+
* @param endPoint API REST end point for the extension
|
|
8
|
+
* @param init Initial values for the request
|
|
9
|
+
* @returns The response body interpreted as JSON
|
|
10
|
+
*/
|
|
11
|
+
export async function requestAPI(endPoint = '', init = {}) {
|
|
12
|
+
// Make request to Jupyter API
|
|
13
|
+
const settings = ServerConnection.makeSettings();
|
|
14
|
+
const requestUrl = URLExt.join(settings.baseUrl, 'notebook-intelligence', // API Namespace
|
|
15
|
+
endPoint);
|
|
16
|
+
let response;
|
|
17
|
+
try {
|
|
18
|
+
response = await ServerConnection.makeRequest(requestUrl, init, settings);
|
|
19
|
+
}
|
|
20
|
+
catch (error) {
|
|
21
|
+
throw new ServerConnection.NetworkError(error);
|
|
22
|
+
}
|
|
23
|
+
let data = await response.text();
|
|
24
|
+
if (data.length > 0) {
|
|
25
|
+
try {
|
|
26
|
+
data = JSON.parse(data);
|
|
27
|
+
}
|
|
28
|
+
catch (error) {
|
|
29
|
+
console.log('Not a JSON response body.', response);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
if (!response.ok) {
|
|
33
|
+
throw new ServerConnection.ResponseError(response, data.message || data.error || data);
|
|
34
|
+
}
|
|
35
|
+
return data;
|
|
36
|
+
}
|
package/lib/icons.d.ts
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { FC, SVGAttributes } from 'react';
|
|
2
|
+
interface IIconBaseProps extends SVGAttributes<SVGElement> {
|
|
3
|
+
size?: string | number;
|
|
4
|
+
color?: string;
|
|
5
|
+
title?: string;
|
|
6
|
+
}
|
|
7
|
+
type IconLike = FC<IIconBaseProps>;
|
|
8
|
+
export declare const VscAdd: IconLike;
|
|
9
|
+
export declare const VscArrowDown: IconLike;
|
|
10
|
+
export declare const VscArrowUp: IconLike;
|
|
11
|
+
export declare const VscAttach: IconLike;
|
|
12
|
+
export declare const VscCheck: IconLike;
|
|
13
|
+
export declare const VscChevronDown: IconLike;
|
|
14
|
+
export declare const VscChevronRight: IconLike;
|
|
15
|
+
export declare const VscChevronUp: IconLike;
|
|
16
|
+
export declare const VscClose: IconLike;
|
|
17
|
+
export declare const VscCloudUpload: IconLike;
|
|
18
|
+
export declare const VscCopy: IconLike;
|
|
19
|
+
export declare const VscEdit: IconLike;
|
|
20
|
+
export declare const VscEye: IconLike;
|
|
21
|
+
export declare const VscEyeClosed: IconLike;
|
|
22
|
+
export declare const VscFile: IconLike;
|
|
23
|
+
export declare const VscHistory: IconLike;
|
|
24
|
+
export declare const VscInsert: IconLike;
|
|
25
|
+
export declare const VscLink: IconLike;
|
|
26
|
+
export declare const VscNewFile: IconLike;
|
|
27
|
+
export declare const VscNotebook: IconLike;
|
|
28
|
+
export declare const VscPassFilled: IconLike;
|
|
29
|
+
export declare const VscRefresh: IconLike;
|
|
30
|
+
export declare const VscSend: IconLike;
|
|
31
|
+
export declare const VscSettingsGear: IconLike;
|
|
32
|
+
export declare const VscSparkle: IconLike;
|
|
33
|
+
export declare const VscStopCircle: IconLike;
|
|
34
|
+
export declare const VscThumbsdown: IconLike;
|
|
35
|
+
export declare const VscThumbsdownFilled: IconLike;
|
|
36
|
+
export declare const VscThumbsup: IconLike;
|
|
37
|
+
export declare const VscThumbsupFilled: IconLike;
|
|
38
|
+
export declare const VscTools: IconLike;
|
|
39
|
+
export declare const VscTrash: IconLike;
|
|
40
|
+
export declare const VscTriangleDown: IconLike;
|
|
41
|
+
export declare const VscTriangleRight: IconLike;
|
|
42
|
+
export declare const VscWarning: IconLike;
|
|
43
|
+
export declare const MdCheckBox: IconLike;
|
|
44
|
+
export declare const MdOutlineCheckBoxOutlineBlank: IconLike;
|
|
45
|
+
export {};
|
package/lib/icons.js
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
// Central re-export of react-icons we use, with React-18-compatible
|
|
2
|
+
// types. react-icons 5.5.0+ types its icons as returning React.ReactNode,
|
|
3
|
+
// which @types/react@18's JSX namespace rejects as a JSX-component
|
|
4
|
+
// return type (TS2786). The runtime is unaffected — this module just
|
|
5
|
+
// re-types the icons through `FC<IIconBaseProps>` so the JSX runtime
|
|
6
|
+
// accepts them under React 18.
|
|
7
|
+
//
|
|
8
|
+
// Import icons from this module (e.g. `import { VscThumbsup } from '../icons'`)
|
|
9
|
+
// rather than directly from `react-icons/vsc`/`react-icons/md`, so a future
|
|
10
|
+
// bump of @types/react to v19+ only requires deleting this shim.
|
|
11
|
+
import * as Md from 'react-icons/md';
|
|
12
|
+
import * as Vsc from 'react-icons/vsc';
|
|
13
|
+
// Typed parameter (IconType, the upstream signature) so a typo in
|
|
14
|
+
// `Vsc.VscFooo` is caught at compile time. The `unknown` indirection
|
|
15
|
+
// is what the TS error message asks for when widening a return type
|
|
16
|
+
// across the React 18 → React 19 ReactNode boundary.
|
|
17
|
+
const asIcon = (Component) => Component;
|
|
18
|
+
export const VscAdd = asIcon(Vsc.VscAdd);
|
|
19
|
+
export const VscArrowDown = asIcon(Vsc.VscArrowDown);
|
|
20
|
+
export const VscArrowUp = asIcon(Vsc.VscArrowUp);
|
|
21
|
+
export const VscAttach = asIcon(Vsc.VscAttach);
|
|
22
|
+
export const VscCheck = asIcon(Vsc.VscCheck);
|
|
23
|
+
export const VscChevronDown = asIcon(Vsc.VscChevronDown);
|
|
24
|
+
export const VscChevronRight = asIcon(Vsc.VscChevronRight);
|
|
25
|
+
export const VscChevronUp = asIcon(Vsc.VscChevronUp);
|
|
26
|
+
export const VscClose = asIcon(Vsc.VscClose);
|
|
27
|
+
export const VscCloudUpload = asIcon(Vsc.VscCloudUpload);
|
|
28
|
+
export const VscCopy = asIcon(Vsc.VscCopy);
|
|
29
|
+
export const VscEdit = asIcon(Vsc.VscEdit);
|
|
30
|
+
export const VscEye = asIcon(Vsc.VscEye);
|
|
31
|
+
export const VscEyeClosed = asIcon(Vsc.VscEyeClosed);
|
|
32
|
+
export const VscFile = asIcon(Vsc.VscFile);
|
|
33
|
+
export const VscHistory = asIcon(Vsc.VscHistory);
|
|
34
|
+
export const VscInsert = asIcon(Vsc.VscInsert);
|
|
35
|
+
export const VscLink = asIcon(Vsc.VscLink);
|
|
36
|
+
export const VscNewFile = asIcon(Vsc.VscNewFile);
|
|
37
|
+
export const VscNotebook = asIcon(Vsc.VscNotebook);
|
|
38
|
+
export const VscPassFilled = asIcon(Vsc.VscPassFilled);
|
|
39
|
+
export const VscRefresh = asIcon(Vsc.VscRefresh);
|
|
40
|
+
export const VscSend = asIcon(Vsc.VscSend);
|
|
41
|
+
export const VscSettingsGear = asIcon(Vsc.VscSettingsGear);
|
|
42
|
+
export const VscSparkle = asIcon(Vsc.VscSparkle);
|
|
43
|
+
export const VscStopCircle = asIcon(Vsc.VscStopCircle);
|
|
44
|
+
export const VscThumbsdown = asIcon(Vsc.VscThumbsdown);
|
|
45
|
+
export const VscThumbsdownFilled = asIcon(Vsc.VscThumbsdownFilled);
|
|
46
|
+
export const VscThumbsup = asIcon(Vsc.VscThumbsup);
|
|
47
|
+
export const VscThumbsupFilled = asIcon(Vsc.VscThumbsupFilled);
|
|
48
|
+
export const VscTools = asIcon(Vsc.VscTools);
|
|
49
|
+
export const VscTrash = asIcon(Vsc.VscTrash);
|
|
50
|
+
export const VscTriangleDown = asIcon(Vsc.VscTriangleDown);
|
|
51
|
+
export const VscTriangleRight = asIcon(Vsc.VscTriangleRight);
|
|
52
|
+
export const VscWarning = asIcon(Vsc.VscWarning);
|
|
53
|
+
export const MdCheckBox = asIcon(Md.MdCheckBox);
|
|
54
|
+
export const MdOutlineCheckBoxOutlineBlank = asIcon(Md.MdOutlineCheckBoxOutlineBlank);
|
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { JupyterFrontEndPlugin } from '@jupyterlab/application';
|
|
2
|
+
import { INotebookIntelligence } from './tokens';
|
|
3
|
+
/**
|
|
4
|
+
* Initialization data for the @plmbr/notebook-intelligence extension.
|
|
5
|
+
*/
|
|
6
|
+
declare const plugin: JupyterFrontEndPlugin<INotebookIntelligence>;
|
|
7
|
+
export * from './tokens';
|
|
8
|
+
export default plugin;
|