pi-studio 0.9.47 → 0.9.49

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 CHANGED
@@ -4,6 +4,25 @@ All notable changes to `pi-studio` are documented here.
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [0.9.49] — 2026-08-24
8
+
9
+ ### Added
10
+ - Open local PDFs directly with `/studio <path.pdf>` or `/studio-editor-only <path.pdf>` in a read-only, right-focused companion preview, including optional `#page=N` hints and the existing PDF viewer actions without replacing an open full Studio workspace.
11
+ - Add opt-in PDF auto-refresh through `/studio --watch <path.pdf>`, `watch: true` preview blocks, and synchronized card/focus-viewer toggles; Studio checks only visible tabs, waits for a changed file to stabilize, and retains **Cmd/Ctrl+Alt+R** as a manual refresh shortcut.
12
+
13
+ ### Changed
14
+ - Show active PDF auto-refresh controls as plain accent text, matching Studio's current active-tool treatment instead of using a filled toggle pill.
15
+
16
+ ## [0.9.48] — 2026-08-21
17
+
18
+ ### Added
19
+ - Add explicit browser-tab, system-viewer, and file-manager actions to local PDF preview cards and the focused PDF viewer.
20
+
21
+ ### Fixed
22
+ - Make **Import file copy…** open a persistent dialog with browser selection and authenticated import from a path on the computer running Pi, keeping the path fallback visible when embedded or remote browser views cannot open a native chooser and avoiding environment or user-agent detection.
23
+ - Replace native JavaScript confirmation and text-input dialogs with accessible in-page dialogs so comment deletion, overwrite/reset actions, and Save As work in embedded WebKit browsers such as Muxy.
24
+ - Keep Pandoc-based LaTeX previews and right-preview PDF/HTML exports usable when a local legacy style overrides LaTeX document startup, omitting only the incompatible package from the conversion while preserving includes and warning that package-specific layout is absent.
25
+
7
26
  ## [0.9.47] — 2026-08-20
8
27
 
9
28
  ### Fixed
package/README.md CHANGED
@@ -35,6 +35,7 @@ _The video shows an earlier version of the Studio interface. The basic workflow
35
35
  - 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–7` switches directly between right-pane views while `Cmd/Ctrl+Alt+P` / `Cmd/Ctrl+Alt+E` / `Cmd/Ctrl+Alt+W` keep quick mnemonic shortcuts for Response Preview, Editor Preview, and Working
36
36
  - 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
37
37
  - Includes a right-pane **Files** view for browsing the current Pi session/resource directory, sorting by name/modified time/size, opening folders, opening the Files root in Finder/the system file manager, loading text/code/CSV/TSV documents into the editor, previewing PDFs/images, opening PDF/image previews in a new Studio tab, 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
38
+ - 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
38
39
  - 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 compact refresh-persistent **Studio REPL Record** of user and Pi-sent code, a secondary raw tmux mirror, agent-facing `studio_repl_status` / `studio_repl_send` tools, and Markdown/PDF/HTML export
39
40
  - 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
40
41
  - 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
@@ -53,7 +54,7 @@ _The video shows an earlier version of the Studio interface. The basic workflow
53
54
  - Renders Markdown/LaTeX/code previews (math + Mermaid) plus lightweight CSV/TSV table previews, theme-synced with pi, with copy buttons for code blocks and blockquotes; Mermaid previews include Lucide/Logos icon nodes and accessible label contrast over custom fills
54
55
  - Adds a contextual **Editor (Quarto Preview)** right-pane view for file-backed `.qmd`, `.md`, and `.markdown` documents. Studio checks Quarto and the document/project configuration before showing an explicit start action, launches a single loopback `quarto preview` process with `--no-execute`, embeds Quarto's authoritative saved-file output without restyling it, and provides open-in-browser, restart, stop, logs, and unsaved-editor warnings. If Quarto is missing, the view remains available with an actionable dependency message.
55
56
  - Renders straight, unfenced interactive HTML in preview via a sandboxed browser iframe with zoom controls, while fenced `html` blocks remain source code
56
- - Embeds local PDFs in Studio Markdown previews via explicit `studio-pdf` fenced blocks, with a Focus action for temporarily enlarging the embedded viewer
57
+ - Embeds local PDFs in Studio Markdown previews via explicit `studio-pdf` fenced blocks and opens existing PDFs directly with `/studio <path.pdf>`, with Focus, browser-tab, system-viewer, show-in-folder, manual refresh, and opt-in stable-file auto-refresh actions
57
58
  - Ships optional `pi-studio-dark` and `pi-studio-light` themes tuned for Studio's browser workspace
58
59
  - Exports right-pane preview as PDF (pandoc + LaTeX) or standalone HTML into the source file directory, Studio working directory, or Pi session directory; PDF export can open in a Studio preview tab or the default PDF viewer, and HTML export can open in the default browser or in a new Studio editor tab for inspection/commenting, while preserving authored HTML previews as HTML and rendering CSV/TSV editor previews as tables
59
60
  - 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.
@@ -64,7 +65,8 @@ _The video shows an earlier version of the Studio interface. The basic workflow
64
65
  | Command | Description |
65
66
  |---|---|
66
67
  | `/studio` | Open in Muxy or cmux when available, otherwise the system browser, with the last assistant response (fallback: blank) |
67
- | `/studio <path>` | Open with file preloaded |
68
+ | `/studio <path>` | Open a text file in the editor, or a PDF in a read-only companion preview tab |
69
+ | `/studio --watch <pdf>` | Open a local PDF with stable-file auto-refresh enabled |
68
70
  | `/studio --last` | Force last response |
69
71
  | `/studio --blank` | Force blank editor |
70
72
  | `/studio --no-browser` | Start/print the Studio URL without opening a browser, useful for forwarded or phone/browser sessions |
@@ -73,7 +75,7 @@ _The video shows an earlier version of the Studio interface. The basic workflow
73
75
  | `/studio --stop` | Stop studio server |
74
76
  | `/studio --help` | Show help |
75
77
  | `/studio-replace [path\|--blank\|--last]` | Replace the current full Studio view with a new full Studio view |
76
- | `/studio-editor-only [path\|--blank\|--last]` | Open an editor-only Studio view; multiple editor-only views may be open at once |
78
+ | `/studio-editor-only [path\|--blank\|--last]` | Open an editor-only view, or a read-only PDF preview; multiple companion views may be open at once |
77
79
  | `/studio-current <path>` | Load a file into currently open Studio tab(s) without opening a new browser window |
78
80
  | `/studio-pdf [path] [options]` | Export a local file, or the last model response when no path is given, via the Studio PDF pipeline |
79
81
  | `/studio-html [path]` | Export a local file, or the last model response when no path is given, to standalone HTML via the Studio preview pipeline |
@@ -117,11 +119,14 @@ path: attachments/paper.pdf
117
119
  title: Optional title
118
120
  page: 3
119
121
  height: 760
122
+ watch: true
120
123
  caption: Optional caption
121
124
  ```
122
125
  ````
123
126
 
124
- `path` must point to a local `.pdf` within the current Studio resource directory. Relative paths resolve from the opened document's directory, or from Studio's working dir for non-file-backed content. `page` is an initial page hint for the browser PDF viewer, and `height` controls the embedded frame height in pixels. Use normal Markdown links for PDFs when embedding is not useful.
127
+ `path` must point to a local `.pdf` within the current Studio resource directory. Relative paths resolve from the opened document's directory, or from Studio's working dir for non-file-backed content. `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.
128
+
129
+ 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.
125
130
 
126
131
  ### Mermaid icons
127
132
 
@@ -160,6 +165,7 @@ Studio only passes icon-pack arguments when a diagram actually references `lucid
160
165
  - Full preview/PDF quality depends on `pandoc` (and `xelatex` for PDF):
161
166
  - `brew install pandoc`
162
167
  - install TeX Live/MacTeX for PDF export
168
+ - LaTeX browser previews and **Export right preview** are semantic Pandoc conversions rather than authoritative compilation of the original source layout. If a local legacy `.sty` package overrides LaTeX document startup in a way that prevents Pandoc from reading the document, Studio omits that package from the conversion only, preserves local includes, and shows a warning; compile the original source directly with LaTeX for exact package-specific layout.
163
169
  - **Editor (Quarto Preview)** is optional and requires the `quarto` CLI on Studio's `PATH`. It supports saved `.qmd`, `.md`, and `.markdown` files, whether standalone or part of a Quarto project. Selecting the view only inspects the saved document; starting the preview is explicit. Studio passes `--no-execute`, which prevents computational cells from running, but trusted Quarto project extensions, filters, configuration, and render hooks are still processed, and Quarto may create or update its normal rendered output files. The preview reflects disk, not unsaved editor text.
164
170
  - Quarto serves its embedded page on a second random loopback port. When Studio itself is reached through SSH port forwarding, that Quarto port (shown in **Show log**) must also be forwarded, or the preview should be opened from a Studio process running on the browser's machine.
165
171
  - Export subprocess timeouts default to bounded values and can be tuned with `PI_STUDIO_PANDOC_TIMEOUT_MS`, `PI_STUDIO_LATEX_TIMEOUT_MS`, `PI_STUDIO_MERMAID_TIMEOUT_MS`, and `PI_STUDIO_HTML_RENDER_OUTPUT_MAX_BYTES` for unusually large embedded-asset HTML exports.