pi-studio 0.9.57 → 0.9.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/CHANGELOG.md +25 -0
- package/README.md +19 -5
- package/ROADMAP.md +20 -1
- package/client/studio-client.js +695 -64
- package/client/studio.css +172 -0
- package/index.ts +110 -9
- package/package.json +1 -1
- package/shared/studio-pi-editor-draft.js +49 -0
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,31 @@ All notable changes to `pi-studio` are documented here.
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [0.9.59] — 2026-09-03
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
- Add `Cmd/Ctrl+Shift+L` for loading the current Pi terminal input draft into Studio without clearing it.
|
|
11
|
+
- Add a confirmed **Clear Pi editor text…** action for removing text waiting in Pi's terminal input editor without changing Studio text or conversation history.
|
|
12
|
+
|
|
13
|
+
### Changed
|
|
14
|
+
- Treat Pi terminal drafts loaded into Studio or staged from Studio as transient linked handoffs. An accepted **Run editor text** now clears the terminal draft only when its SHA-256 fingerprint and byte length still match; later terminal typing, added `pi-nvim-context` context, another client change, and failed submissions all preserve it.
|
|
15
|
+
|
|
16
|
+
## [0.9.58] — 2026-09-03
|
|
17
|
+
|
|
18
|
+
### Added
|
|
19
|
+
- Add a scoped REPL-pane **Quick send** composer beneath the Shared REPL Record, with exact raw text, multiline editing, explicit `Cmd/Ctrl+Enter` submission, a compact session-name target that links back to the session controls while retaining full runtime/pane details on hover, exact-tmux-lifetime in-memory drafts, and acknowledgement-aware clearing through the existing shared lease/control-file/record path.
|
|
20
|
+
- Add persisted **Side by side**, **Editor above**, and **Response above** pane layouts with orientation-aware pointer and keyboard resizing.
|
|
21
|
+
- Add opt-in, browser-stored **Follow activity** view switching from Working during main-agent generation to Response Preview on completion, while keeping it off by default and respecting manual view changes.
|
|
22
|
+
|
|
23
|
+
### Changed
|
|
24
|
+
- Add `Cmd/Ctrl+Alt+R` as a mnemonic direct switch to the REPL view, focus its Quick send composer when available, and move manual PDF refresh to `Cmd/Ctrl+Alt+Shift+R`.
|
|
25
|
+
|
|
26
|
+
### Fixed
|
|
27
|
+
- Keep Quick send results clean when IPython wraps the private loader command across continuation prompts, including inside the word `globals`.
|
|
28
|
+
|
|
29
|
+
### Acknowledgements
|
|
30
|
+
- Credit [Hal Gumbert / CampSoftware](https://github.com/campsoftware) for the [Pi Studio Activity](https://campsoftware.com/blog/post.php?post=20260507-ai-ollama-pi-studio-activity) experiments that inspired the built-in **Follow activity** option and stacked pane layouts.
|
|
31
|
+
|
|
7
32
|
## [0.9.57] — 2026-09-03
|
|
8
33
|
|
|
9
34
|
### Added
|
package/README.md
CHANGED
|
@@ -30,16 +30,18 @@ _The video shows an earlier version of the Studio interface. The basic workflow
|
|
|
30
30
|
|
|
31
31
|
## What it does
|
|
32
32
|
|
|
33
|
-
- Opens a two-pane browser workspace: **Editor**
|
|
33
|
+
- Opens a two-pane browser workspace: **Editor** + **Response/Working/Editor Preview/Quarto Preview/Side questions**, side by side by default
|
|
34
|
+
- Lets you choose a persisted pane layout from **View → Workspace**: side by side, Editor above, or Response above; the same divider resizes width or height and either pane can still be focused independently
|
|
34
35
|
- Supports one canonical full Studio view per Pi session, plus additional editor-only companion views when you want extra editing/preview surfaces; editor-only views can also browse files and use the Studio REPL send controls without taking over the full Studio session view
|
|
35
|
-
- Includes a global **Zen** mode that hides the Studio header and secondary chrome without changing the current
|
|
36
|
+
- Includes a global **Zen** mode that hides the Studio header and secondary chrome without changing the current pane layout; the header can also be hidden independently and restored from the top-right edge
|
|
36
37
|
- Runs editor text directly, asks for structured critique (auto/writing/code focus), offers explicit **Show me** actions for a one-turn compact visual or structural explanation of the editor selection/document, displayed response, or current conversation topic, provides a manual **Suggest completion** action for short cursor-aware continuations (`Option/Alt+Tab` where available or `Cmd/Ctrl+Shift+Space` from the editor, `Tab` to insert a visible suggestion) with an optional editor-plus-latest-response context mode, or opens **Quiz me** for a Studio-native active-recall loop over the current editor text, selection, current file, folder, or repo, with optional focus guidance for shaping question selection
|
|
38
|
+
- Treats text copied from or staged in Pi's terminal input editor as a linked draft: ordinary Studio edits retain the link, and an accepted **Run editor text** clears the terminal draft only when it has not changed in the meantime; a confirmed **Clear Pi editor text…** action remains available explicitly
|
|
37
39
|
- Adds a right-pane **Side questions** thread for contextual questions that stay outside the main Pi conversation unless explicitly promoted. It can start with the editor selection, the Markdown/LaTeX heading block at the cursor, nearby unstructured text, the whole editor, the displayed response, or no starting text; independently, it can use read-only tools to map, search, and read the document folder, repository, or another chosen folder—including extracted PDF, DOCX, ODT, and EPUB text—and can optionally search the web through Brave Search.
|
|
38
|
-
- Includes a live **Working** view for following current model/tool activity, with `All` / `Thinking` / `Tools` filters, image previews for image-producing tool outputs, plus **Load visible into editor** and **Copy visible** actions; when cycling response history, Working follows saved working details for the selected response when available, and `Cmd/Ctrl+Alt+1–8` switches directly between right-pane views while `Cmd/Ctrl+Alt+P` / `Cmd/Ctrl+Alt+E` / `Cmd/Ctrl+Alt+W` / `Cmd/Ctrl+Alt+F` / `Cmd/Ctrl+Alt+Q` keep quick mnemonic shortcuts for Response Preview, Editor Preview, Working, Files, and Side questions
|
|
40
|
+
- Includes a live **Working** view for following current model/tool activity, with `All` / `Thinking` / `Tools` filters, image previews for image-producing tool outputs, plus **Load visible into editor** and **Copy visible** actions; optional browser-stored **Follow activity** (off by default under **View → Workspace**) switches to Working when the main Pi agent starts generating and to Response Preview when it completes, unless you manually choose another view during that request. When cycling response history, Working follows saved working details for the selected response when available, and `Cmd/Ctrl+Alt+1–8` switches directly between right-pane views while `Cmd/Ctrl+Alt+P` / `Cmd/Ctrl+Alt+E` / `Cmd/Ctrl+Alt+W` / `Cmd/Ctrl+Alt+F` / `Cmd/Ctrl+Alt+R` / `Cmd/Ctrl+Alt+Q` keep quick mnemonic shortcuts for Response Preview, Editor Preview, Working, Files, REPL, and Side questions
|
|
39
41
|
- Includes a right-pane **Changes** view for browsing the current git diff by file, previewing per-file diffs, opening changed files, loading the full diff into the editor, and copying the diff
|
|
40
42
|
- Includes a right-pane **Files** view rooted in folders allowed for the current Studio session, with an **Allow folder…** action and location selector; exact-file grants can still be opened independently without exposing their parent folders. Files supports sorting by name/modified time/size, opening folders or the current root in Finder/the system file manager, loading text/code/CSV/TSV documents into the editor, opening a read-only **Preview (follow)** tab whose disk content is authoritative, previewing PDFs/images, opening previews in new Studio tabs, converting DOCX/ODT documents to editable Markdown when Pandoc is available after confirmation, copying paths, setting the current folder as the Studio working directory, and revealing files in the file manager
|
|
41
43
|
- Imports detached text-file copies either through the browser's file picker or from a path on the computer running Pi, keeping the path option available in embedded and remote browser views; imported copies remain detached until saved or opened as file-backed documents
|
|
42
|
-
- Includes an optional tmux-backed **REPL** view for Shell, Python, IPython, Julia, R, GHCi, and Clojure sessions, with Raw/Literate send modes, `Cmd/Ctrl+Shift+Enter` **Send to REPL**, session start/stop/interrupt controls, a privacy-conscious Off/Summary/Full pane-echo selector, a compact refresh-persistent **Shared REPL Record** of compatible-client submissions, a secondary raw tmux mirror, agent-facing `studio_repl_status` / `studio_repl_send` tools, and Markdown/PDF/HTML export
|
|
44
|
+
- Includes an optional tmux-backed **REPL** view for Shell, Python, IPython, Julia, R, GHCi, and Clojure sessions, with a scoped **Quick send** composer (`Cmd/Ctrl+Enter`), Raw/Literate editor send modes, `Cmd/Ctrl+Shift+Enter` **Send to REPL**, session start/stop/interrupt controls, a privacy-conscious Off/Summary/Full pane-echo selector, a compact refresh-persistent **Shared REPL Record** of compatible-client submissions, a secondary raw tmux mirror, agent-facing `studio_repl_status` / `studio_repl_send` tools, and Markdown/PDF/HTML export
|
|
43
45
|
- Includes a local persistent scratchpad for quick notes you want to keep out of the main editor until you're ready to copy or insert them, with a **Recent…** picker for recovering scratchpads saved under earlier file/draft identities
|
|
44
46
|
- Includes a docked **Outline** rail for navigating document structure in the current editor text, with clickable entries that jump in the raw editor and reveal matching preview locations when available
|
|
45
47
|
- Restores each browser tab’s editor workspace after refresh or cmux hidden-surface reconstruction, and provides an explicit **Reset editor** action when you want to discard the restored draft and return the tab to a fresh blank draft without changing responses or saved files
|
|
@@ -65,6 +67,12 @@ _The video shows an earlier version of the Studio interface. The basic workflow
|
|
|
65
67
|
- Exports local files headlessly via `/studio-pdf <path>` to `<name>.studio.pdf` or `/studio-html <path>` to `<name>.studio.html`; without a path, those commands export the last model response to a timestamped file. Agent tools `studio_export_pdf` and `studio_export_html` expose the same export pipeline for remote/Telegram-style sessions.
|
|
66
68
|
- Shows model/session/context usage in the footer, plus compact-context and active-theme controls
|
|
67
69
|
|
|
70
|
+
## Pi input-draft handoff
|
|
71
|
+
|
|
72
|
+
Tools such as [`pi-nvim-context`](https://github.com/omaclaren/pi-nvim-context) deliberately accumulate visible context in Pi's terminal input draft without submitting it. **Load from pi editor** (`Cmd/Ctrl+Shift+L`) copies that draft into Studio without clearing it and records only a transient SHA-256 fingerprint and byte length for the handoff—no additional snapshot copy beyond the text already in Studio. You can then edit the text freely in Studio.
|
|
73
|
+
|
|
74
|
+
When Pi accepts **Run editor text**, Studio clears the linked terminal draft only if its current fingerprint and byte length still match those captured at load time. Terminal typing, additional Neovim context, or another client changing the draft causes Studio to preserve it silently. A failed or rejected run also leaves it intact. **Send current text to Pi editor** establishes the same safe link, while **Clear Pi editor text…** provides a separate confirmed, unconditional cleanup action. Studio never clears terminal history or its own editor through this handoff.
|
|
75
|
+
|
|
68
76
|
## Commands
|
|
69
77
|
|
|
70
78
|
| Command | Description |
|
|
@@ -118,6 +126,8 @@ Compatible clients publish a versioned opaque record ID in tmux and keep the bou
|
|
|
118
126
|
|
|
119
127
|
The clean record covers only submissions and notes whose boundaries a compatible client knows. Text typed directly into an attached tmux pane remains in the secondary raw pane/history mirror and is not presented as reliably parsed code/output. **Export record** produces a canonical Markdown representation with origin, mode, status, runtime, timestamp, and this limitation; PDF and HTML exports are derived from that Markdown.
|
|
120
128
|
|
|
129
|
+
**Quick send** is a small command composer beneath the Shared REPL Record and above the secondary raw mirror, not a second persistent editor or terminal emulator. Its compact target shows the selected session name and doubles as a link back to the session controls; the hover and accessibility label retain the runtime and exact tmux pane details. Plain Enter adds a line, and `Cmd/Ctrl+Enter` submits the exact text through the same cross-client lease, control-file, and Shared REPL Record path as editor sends. Unsaved drafts stay in browser memory per exact tmux lifetime/runtime, survive session switching, and clear only after Studio acknowledges the submission; rejected text remains available to edit or retry.
|
|
130
|
+
|
|
121
131
|
### Submission display and alignment anchors
|
|
122
132
|
|
|
123
133
|
Optional pane echo places submitted code after a compact begin anchor, followed by a plain `── output ──` divider and a completion anchor. The anchors contain a stable 12-character hash derived from the Shared REPL Record entry ID, so compatible clients can align known sends in future derived transcripts without exposing the entry ID itself. Studio strips the exact header, source preview, divider, and footer from captured tool output and the clean record; they remain visible only in the raw pane/history.
|
|
@@ -176,7 +186,7 @@ caption: Optional caption
|
|
|
176
186
|
|
|
177
187
|
`path` must point to a local `.pdf`. Relative paths resolve from the opened document's directory, or from Studio's working directory for non-file-backed content; the resolved file must be inside a location allowed for the current Studio session before it loads. `page` is an initial page hint for the browser PDF viewer, `height` controls the embedded frame height in pixels, and `watch: true` enables auto-refresh after Studio observes the changed file in a stable state. Use normal Markdown links for PDFs when embedding is not useful.
|
|
178
188
|
|
|
179
|
-
To view an existing PDF directly, run `/studio report.pdf` (or `/studio "path with spaces/report.pdf"`). The PDF opens read-only in a focused companion preview, even when the full Studio workspace is already open. A `#page=N` suffix selects the initial page. Auto-refresh is off by default; use `/studio --watch report.pdf` to start with it on, or toggle **Auto-refresh** in the PDF card or focused viewer. Studio checks only while the tab is visible and waits for two matching file-version observations before reloading, which avoids reading a PDF while LaTeX is still writing it. **Cmd/Ctrl+Alt+R** manually refreshes the focused or visible PDF. This is distinct from `/studio-pdf`, which exports Markdown, LaTeX, code, or the last response to a new PDF.
|
|
189
|
+
To view an existing PDF directly, run `/studio report.pdf` (or `/studio "path with spaces/report.pdf"`). The PDF opens read-only in a focused companion preview, even when the full Studio workspace is already open. A `#page=N` suffix selects the initial page. Auto-refresh is off by default; use `/studio --watch report.pdf` to start with it on, or toggle **Auto-refresh** in the PDF card or focused viewer. Studio checks only while the tab is visible and waits for two matching file-version observations before reloading, which avoids reading a PDF while LaTeX is still writing it. **Cmd/Ctrl+Alt+Shift+R** manually refreshes the focused or visible PDF. This is distinct from `/studio-pdf`, which exports Markdown, LaTeX, code, or the last response to a new PDF.
|
|
180
190
|
|
|
181
191
|
For a disk-authoritative text or code preview, run `/studio --watch notes.md` or choose **Preview file (follow changes)** from a local-link menu / **Preview (follow)** in Files. This opens a transient read-only companion tab with the preview pane focused; leaving pane focus reveals the same disk-following text as **Source** with a visible **Read-only · follows disk** badge rather than as an editable buffer. Studio polls the canonical file, debounces change bursts, compares SHA-256 content revisions, accepts ordinary and atomic-replacement saves, and never writes back. Each watcher socket is bound to the exact path in a bounded, expiring server-created tab capability; if that identity expires before a reload or reconnect, the tab stays read-only and asks you to open a fresh watched preview. A missing, unreadable, oversized, binary, or path-replaced source leaves the last good preview visible and automatically recovers when the same canonical file becomes readable again. Render failures likewise retain the last successfully staged document rather than replacing it with partial output. On successful updates, Studio restores a nearby stable content anchor where possible and falls back to the previous scroll ratio.
|
|
182
192
|
|
|
@@ -204,6 +214,10 @@ mmdc --version
|
|
|
204
214
|
|
|
205
215
|
Studio only passes icon-pack arguments when a diagram actually references `lucide:` or `logos:`, so ordinary Mermaid PDF diagrams remain compatible with older CLI versions.
|
|
206
216
|
|
|
217
|
+
## Acknowledgements
|
|
218
|
+
|
|
219
|
+
Thanks to [Hal Gumbert / CampSoftware](https://github.com/campsoftware) for publishing [Pi Studio Activity](https://campsoftware.com/blog/post.php?post=20260507-ai-ollama-pi-studio-activity). Its Working-to-Preview following and vertical-layout experiments inspired Studio's built-in **Follow activity** option and stacked pane layouts; the built-in implementation uses Studio's own lifecycle events and layout system.
|
|
220
|
+
|
|
207
221
|
## Notes
|
|
208
222
|
|
|
209
223
|
- Local-only server (`127.0.0.1`) with tokenized Studio URLs.
|
package/ROADMAP.md
CHANGED
|
@@ -97,6 +97,25 @@ A coordinated presentation and future-alignment increment with `pi-repl` 0.4.1:
|
|
|
97
97
|
|
|
98
98
|
A separate Derived REPL Transcript can use these anchors later, but it remains outside protocol v1 and outside this release.
|
|
99
99
|
|
|
100
|
+
## 0.9.58 — Workspace and REPL interaction refinements (shipped 2026-09-03)
|
|
101
|
+
|
|
102
|
+
A small interaction increment before the buffer-first architecture:
|
|
103
|
+
|
|
104
|
+
- add a scoped right-pane Quick send composer that keeps exact-session drafts in memory and uses the existing safe Shared REPL Record send path;
|
|
105
|
+
- add persisted side-by-side and vertical pane arrangements, including either Editor or Response above;
|
|
106
|
+
- add opt-in activity following from Working during main-agent generation to Response Preview on completion, disabled by default and cancelled when the user manually changes views;
|
|
107
|
+
- keep Quick send separate from the durable editor, the raw tmux mirror read-only, and protocol-v1 authority unchanged.
|
|
108
|
+
|
|
109
|
+
## 0.9.59 — Safe Pi input-draft handoff (shipped 2026-09-03)
|
|
110
|
+
|
|
111
|
+
A small workflow refinement for moving Neovim-provided context through Pi and Studio:
|
|
112
|
+
|
|
113
|
+
- load or stage Pi's terminal input draft without clearing it, retaining only a transient SHA-256 fingerprint and byte length for provenance;
|
|
114
|
+
- keep that link through unrestricted Studio edits, then clear the original Pi draft only after Pi accepts the Studio run and the current terminal text still matches exactly;
|
|
115
|
+
- silently preserve later terminal typing, added `pi-nvim-context` context, or another client's changes, and never clear after a rejected submission;
|
|
116
|
+
- provide `Cmd/Ctrl+Shift+L` for loading and a confirmed **Clear Pi editor text…** fallback without changing Studio text or conversation history;
|
|
117
|
+
- keep `pi-nvim-context`, protocol v1, networking, and the buffer-first architecture unchanged.
|
|
118
|
+
|
|
100
119
|
## 0.10.0 — Buffer-first editing
|
|
101
120
|
|
|
102
121
|
The first architectural `0.10` release should add:
|
|
@@ -108,7 +127,7 @@ The first architectural `0.10` release should add:
|
|
|
108
127
|
- MRU cycling, next/previous, close, and reopen commands;
|
|
109
128
|
- originating buffer ID and revision targeting for asynchronous Pi work.
|
|
110
129
|
|
|
111
|
-
PDFs remain preview documents, and conversation history remains session-global.
|
|
130
|
+
PDFs remain preview documents, and conversation history remains session-global. Arbitrary multi-pane layouts, project trees, and simultaneous per-buffer Pi conversations are outside the initial `0.10.0` scope.
|
|
112
131
|
|
|
113
132
|
## Validation matrix
|
|
114
133
|
|