You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<!-- Binder links above are intentionally pointed at the `binder-stable` branch with pinned Binder dependencies; update that branch only after validating Binder builds. -->
14
+
13
15
A JupyterLab extension to write and load simple JupyterLab plugins inside JupyterLab.
14
16
15
17
## Install
@@ -30,7 +32,7 @@ Plugin Playground is built to keep the full plugin prototyping workflow inside J
30
32

31
33

32
34
33
-
The right sidebar includes a single Plugin Playground panel with two collapsible sections. In **Extension Points**, the `Tokens` tab helps you discover available token strings and insert import/dependency updates, the `Commands` tab lets you search command IDs, inspect argument docs, and insert execution snippets (either directly or through AI-assisted prompt mode), and the `Packages` tab surfaces package docs plus npm and repository links for known modules.
35
+
The right sidebar includes a single Plugin Playground panel with three collapsible sections. In **Extension Points**, the `Tokens` tab helps you discover available token strings and insert import/dependency updates, the `Commands` tab lets you search command IDs, inspect argument docs, and insert execution snippets (either directly or through AI-assisted prompt mode), and the `Packages` tab surfaces package docs plus npm and repository links for known modules.
34
36
35
37

36
38

@@ -40,6 +42,8 @@ The **Extension Examples** section lists discovered examples from `extension-exa
40
42
41
43

42
44
45
+
The **Currently Loaded Plugins** section lists plugins loaded by Plugin Playground in the current session, shows each plugin's source path, and lets you deactivate a selected plugin without clearing the rest of the session.
46
+
43
47
Command completion is also included for `app.commands.execute(...)` / `commands.execute(...)` in JavaScript and TypeScript editors, and Notebook v7 integrates `Start from File`, `Build with AI`, and `Take the Tour` into New-file flows so you can create starter plugin files from the tree interface.
44
48
45
49
The Launcher `Plugin Playground` section includes `Start from File`, `Build with AI`, and `Take the Tour` so first-time users can pick a guided flow quickly.
@@ -59,7 +63,7 @@ jlpm docs:screenshots
59
63
3. Paste plugin code into the active editor.
60
64
4. Run `Load Current File As Extension` from the editor toolbar or Command Palette.
61
65
5. Use the `Run on save` icon button for fast iteration on one file.
62
-
6. Use the sidebar to discover tokens, commands, packages, and extension examples.
66
+
6. Use the sidebar to discover tokens, commands, packages, extension examples, and currently loaded playground plugins.
63
67
64
68
For extension examples availability:
65
69
@@ -136,6 +140,8 @@ There are a few differences in how to write plugins in Plugin Playground compare
136
140
- To load code from an external package, RequireJS is used (hidden behind ES module-compatible import syntax), so import statements may need explicit version or file paths.
137
141
- In addition to JupyterLab and Lumino packages, only AMD modules can be imported; ES modules and modules compiled for Webpack/Node are not supported directly and can fail with `Uncaught SyntaxError: Unexpected token 'export'`.
138
142
- The playground can import relative files (`.ts`, `.tsx`, `.js`, and `.css`), load SVG as strings, and load settings schema from `package.json` (`jupyterlab.schemaDir`) with `plugin.json` fallback for single-plugin prototyping.
143
+
- For multi-file prototypes, create a package root with `package.json` before adding files under `src/`, `schema/`, or `style/`. This lets `Share Package` and extension export find the whole plugin folder reliably.
144
+
- Playground prototypes cannot replace existing JupyterLab commands by reusing their command IDs. Register your own command ID and add it to the relevant menu, toolbar, launcher, palette, or cell toolbar instead.
139
145
140
146
### Migrating from version 0.3.0
141
147
@@ -172,6 +178,10 @@ Plugin Playground supports AI-assisted extension prototyping in both JupyterLite
172
178
-[JupyterLite AI documentation](https://jupyterlite-ai.readthedocs.io/en/latest/)
173
179
-[Plugin authoring skill for agents](_agents/skills/plugin-authoring/SKILL.md)
174
180
181
+
### JS Logs Ask AI
182
+
183
+
Plugin Playground adds an `Ask AI` button to JS Logs entries so you can send error text to JupyterLite AI chat for debugging context. The button appears only on `error`/`critical` entries that include text content, and only when JupyterLite AI is available and a provider is configured.
184
+
175
185
### Command Insert Modes (Default + AI Prompt)
176
186
177
187
In the `Commands` tab, each command row includes a split `+` action and a mode dropdown:
Copy file name to clipboardExpand all lines: _agents/skills/plugin-authoring/SKILL.md
+17-1Lines changed: 17 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,8 +37,23 @@ Produce working plugin code that can be loaded with `plugin-playground:load-as-e
37
37
- If the user does not already have a plugin file open or specified, run `plugin-playground:create-new-plugin` with a meaningful `path` argument (for example `app.commands.execute('plugin-playground:create-new-plugin', { path: 'status-indicator.ts' })`) instead of relying on untitled defaults.
38
38
- Start from the generated TypeScript scaffold and adapt it.
39
39
- Plugin Playground supports schema-backed settings during prototyping (`package.json` with `jupyterlab.schemaDir`, with `plugin.json` fallback for single-plugin cases).
40
+
- For any plugin with multiple files, settings schema, CSS, SVG, or other local assets, create a package root up front (for example `my-extension/src/index.ts`) and include a minimal `package.json` in `my-extension/` so `Share Package` and extension export operate on the full folder.
41
+
- When creating nested files through AI file commands, create the parent directories first and verify the files appear in the file browser before continuing.
40
42
- Focus on TypeScript/TSX plugin code. Do not scaffold Python projects (`pyproject.toml`, Python package layout) unless explicitly requested.
41
43
44
+
Minimal package metadata for Playground prototypes:
45
+
46
+
```json
47
+
{
48
+
"name": "my-extension",
49
+
"version": "0.1.0",
50
+
"jupyterlab": {
51
+
"extension": true,
52
+
"schemaDir": "schema"
53
+
}
54
+
}
55
+
```
56
+
42
57
2. Discover available extension points
43
58
44
59
- Run `plugin-playground:list-tokens` to get available tokens.
@@ -57,7 +72,8 @@ Produce working plugin code that can be loaded with `plugin-playground:load-as-e
57
72
58
73
- Start from a minimal plugin shape (`id`, `autoStart`, `activate`).
59
74
- Add `requires` tokens only after confirming availability from step 2.
60
-
- Add commands with stable IDs (`<namespace>:<action>`).
75
+
- Add commands with stable, unique IDs (`<namespace>:<action>`).
76
+
- Do not overwrite or reuse built-in JupyterLab command IDs. Plugin Playground skips duplicate command registrations; register a separate command and add it to the relevant palette, menu, toolbar, launcher, or cell toolbar instead.
61
77
- Use one or more `.ts`/`.tsx` files as needed as complexity grows.
0 commit comments