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
{{ message }}
Repository navigation
Commit f254999
Browse filesBrowse the repository at this point in the historyBrowse files
ZCode Marketplace Bot
committed
feat(ui-plugins): guided setup for Typst, Zotero and Jupyter
Copy file name to clipboardExpand all lines: plugins/jupyter-notebook/README.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,6 +24,7 @@ You can also open the panel from the side pane "+" menu.
24
24
25
25
### Panel
26
26
27
+
-**Setup** when no server is running and the workspace's Python lacks `jupyter-server` or `ipykernel`: the panel checks before you click Start and lists the project Python (and whether uv manages it) and each package. **Send to agent** posts a ready-made message with the right install command (`uv add --dev …` in a uv project, `pip` otherwise) so the agent installs them and starts a server; *Install them yourself* shows the command and *Use uv for this session only*. The panel checks again every few seconds and moves on as soon as the packages are there. Connecting to a running server by URL needs no local install.
27
28
- The panel follows ZCode's theme: colours, fonts and light / dark mode come from the host.
28
29
- One header row: the notebook name opens a switcher for open notebooks, opening and creating notebooks; the kernel status opens the kernel menu.
29
30
- Code, Markdown and raw cells with syntax highlighting; Markdown with LaTeX math.
@@ -66,4 +67,5 @@ pnpm test # unit tests
66
67
pnpm test:integration # against a real Jupyter Server
67
68
pnpm smoke # built MCP server over stdio
68
69
pnpm test:e2e # panel in Chrome through the official AppBridge host
70
+
pnpm test:setup # setup page in Chrome with a real uv environment that lacks the packages
Copy file name to clipboardExpand all lines: plugins/jupyter-notebook/skills/jupyter-notebook/SKILL.md
+9-1Lines changed: 9 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,7 @@ Notebooks live on a Jupyter Server and are shown in the Jupyter Notebook side pa
11
11
12
12
1. Call `list_servers`. It shows connected servers and Jupyter servers running on this machine.
13
13
2. If the user named a server or pasted a URL (with or without `?token=…`), call `connect_server` with it. A server listed as running on this machine needs no token.
14
-
3. Otherwise, if a running server's root contains the notebooks you need, offer to use it; if there is none or the user wants a private one, call `start_server`. It needs a Python with `jupyter-server` and `ipykernel`. On `jupyter_not_installed`, show the user the message and ask whether to install them into the project environment (or retry with `useUv: true` if they use uv). Do not install packages without asking.
14
+
3. Otherwise, if a running server's root contains the notebooks you need, offer to use it; if there is none or the user wants a private one, call `start_server`. It needs a Python with `jupyter-server` and `ipykernel`. On `jupyter_not_installed`, show the user the message and ask whether to install them into the project environment (or retry with `useUv: true` if they use uv); the panel also lists what is missing and can send you a setup request. Do not install packages without asking — a message from the panel starting *Set up Jupyter for the Jupyter Notebook panel* is such a request (see section 6).
15
15
16
16
Paths are relative to the server root. For a server from `start_server` that is the workspace.
17
17
@@ -44,3 +44,11 @@ Keep cells focused: imports and setup first, one step per cell, markdown cells t
44
44
Summarise results in a few sentences in the chat and refer to cells by their index; the outputs are visible in the panel, so do not paste whole tables or tracebacks. When the panel says the user ran into an error in a cell, read that cell, fix it with `edit_notebook`, and run it again.
45
45
46
46
Saving is automatic. On `save_conflict` the file changed on the server (for example in JupyterLab): ask the user whether to keep this version (`save_notebook` with `overwrite: true`) or load theirs (`open_notebook` with `reload: true`).
47
+
48
+
## 6. Setting up Jupyter
49
+
50
+
When the user asks you to set up Jupyter — usually with the panel's message, which names the project's Python, whether uv manages it and which packages are missing — follow its steps:
51
+
52
+
- Install `jupyter-server` and `ipykernel` into the workspace's environment with the command the message gives (`uv add --dev jupyter-server ipykernel` in a uv project, `uv pip install --python .venv …` for a uv environment without `pyproject.toml`, otherwise `<venv python> -m pip install …`). Never install into the system Python; if the workspace has no virtual environment, create one first (`uv venv`, or `python3 -m venv .venv`).
53
+
- Confirm with `<python> -c "import jupyter_server, ipykernel"`.
54
+
- Call `start_server`; the panel switches to the notebook list once the server is up.
Copy file name to clipboardExpand all lines: plugins/typst-workbench/README.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,6 +24,7 @@ You can also open the panel from the side pane "+" menu.
24
24
25
25
### Panel
26
26
27
+
-**Setup** when Typst is missing, too old or broken: a checklist of what the panel found (and where it looked), your system and package managers, and a ready-made message that **Send to agent** posts to the chat so the agent installs it (**Copy** works with any other agent). *Install it yourself* shows the command for your system. The panel checks again every few seconds and opens the preview as soon as Typst runs.
27
28
-**Live preview** of the main file. Each save recompiles incrementally with `typst watch` and the visible pages are redrawn in place — no flicker, and the scroll position stays where it was. Zoom (fit width, fit page, or a percentage), page box, and an **Outline** of the headings.
28
29
-**Main file**: picked automatically (`main.typ`, or the only `.typ` file); switch it from the file menu in the toolbar. The choice is remembered for the workspace. With several candidates and no obvious one, the panel asks.
29
30
-**Status and problems**: the toolbar shows *compiling*, the compile time, or the number of errors and warnings. When the document does not compile, the last good version stays visible (dimmed) and the **Problems** panel lists each error with its location, source line, Typst's hints and the call trace. **Fix with agent** sends them to the agent; **Add to chat** adds them to the agent's context.
Copy file name to clipboardExpand all lines: plugins/typst-workbench/skills/typst/SKILL.md
+11-1Lines changed: 11 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ The plugin runs the user's own `typst` (their fonts, packages and version) as a
10
10
## 1. Orient
11
11
12
12
- Call `status` first. It opens the panel and reports the Typst version, the main file, the other `.typ` files and the latest compile result.
13
-
-`typst_missing` / `typst_too_old` / `typst_error`: tell the user what the message says (install or update Typst, or set *Typst path* in the plugin settings). Do not install software yourself unless asked.
13
+
-`typst_missing` / `typst_too_old` / `typst_error`: Typst is not usable. Tell the user, and point them at the Typst panel: it lists what is missing and can send you a setup request with the facts it detected. Do not install software unless the user asks — a message from the panel starting *Set up Typst*, *Update Typst* or *Fix Typst for the Typst panel* is such a request (see section 7).
14
14
-`no_main`: pick the file the user would pass to `typst compile` (the one that `#include`s or `#import`s the others) and call `set_main`; ask if it is unclear. If there are no `.typ` files, create `main.typ` — the panel picks it up.
15
15
- Follow the project's existing structure and conventions (templates, `#import`ed packages, file layout). Use the user's Typst version's syntax; `status` tells you the version.
16
16
@@ -42,3 +42,13 @@ Do not run `typst compile` or `typst watch` in a shell for previewing; use these
42
42
## 6. Citations
43
43
44
44
Typst reads BibTeX (`.bib`) and Hayagriva (`.yml`) files with `#bibliography("refs.bib")` and cites with `@key`. If the Zotero plugin is available, use its `export_bib` to write the `.bib` file and use the citation keys it returns; never invent keys.
45
+
46
+
## 7. Setting up Typst
47
+
48
+
When the user asks you to install, update or fix Typst — usually with the panel's message, which lists the operating system, the folders it searched and the package managers it found — follow its steps:
49
+
50
+
- Use the package manager the message names: `brew install typst` (Homebrew), `winget install --id Typst.Typst`, `scoop install typst`, or `cargo install --locked typst-cli`. Without one, use a release from https://github.com/typst/typst/releases. Update an old Typst with the tool that installed it.
51
+
- Ask before using `sudo`, installing a package manager, or editing shell profiles.
52
+
- Confirm with `typst --version` (0.12 or later).
53
+
- The panel looks on PATH, in the usual install folders (Homebrew, `~/.cargo/bin`, `~/.local/bin`, …) and in the login shell. If Typst ends up somewhere else, give the user the full path for the plugin setting *Typst path*.
54
+
- The panel checks again every few seconds and starts the preview by itself; then call `status`.
0 commit comments