pi-studio 0.9.49 → 0.9.51

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,31 @@ All notable changes to `pi-studio` are documented here.
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [0.9.51] — 2026-08-26
8
+
9
+ ### Added
10
+ - Add a Studio-native **Side questions** right-pane thread that runs independently of the main Pi conversation, supports follow-ups and explicit copy/insert/promote actions, and keeps the side exchange out of main history unless the user chooses **Bring to main conversation**.
11
+ - Separate the starting-text snapshot from progressive file access: side threads can start from an editor selection, Markdown/LaTeX heading block, nearby text, whole editor, displayed response, or no starting text, then selectively map, search, and read a bounded document folder, repository, or chosen folder through root-confined read-only tools.
12
+ - Add opt-in Brave web search with cited result URLs, plus read-only text extraction for local PDF, DOCX, ODT, and EPUB context when the corresponding command-line dependency is available.
13
+ - Let side threads use an explicit, remembered selection of eligible tools already registered by installed Pi extensions. Studio resolves each selected tool through Pi's provenance metadata, loads only its owning extension into the isolated side runtime, freezes the allowlist for the thread, labels and separately confirms gateway tools, and has no package-specific dependency on an MCP or research extension.
14
+ - Add opt-in, thread-frozen Git context for repository side questions: bounded status, staged and unstaged tracked-file diffs, and up to 20 recent commit summaries are exposed through fixed read-only tools rather than arbitrary command execution.
15
+ - Add explicit side-thread export with Markdown as the canonical durable format: save or copy the visible transcript, open it as an unsaved editor copy, or render it to PDF or HTML without silently persisting hidden source context or raw tool output.
16
+
17
+ ### Changed
18
+ - Keep the editor-only header destination labelled **Side questions**, while full Studio continues to group its broader critique, explanation, quiz, and side-question actions under **Review**.
19
+ - Add **Cmd/Ctrl+Enter** submission for the initial side question and follow-ups while keeping plain **Enter** for multiline text and retaining the submit buttons; add **Cmd/Ctrl+Alt+Q** as a mnemonic direct switch to the Side questions view.
20
+ - Rename the **Ask aside** action to **Side question**, replace ambiguous current-section wording with a compact **Automatic** rule disclosure and separate **Starting text** / **Related files** summary rows, prevent an empty explicit selection from falling back to the whole document, and keep primary side-question buttons readable on hover.
21
+ - Align Studio's Pi SDK development/runtime compatibility dependencies with Pi 0.84.3 and declare that minimum host version for isolated selected-extension lifecycle support.
22
+ - Update the direct `ws` dependency to 8.21.3, which includes the current memory-disclosure and fragment-exhaustion fixes.
23
+
24
+ ## [0.9.50] — 2026-08-25
25
+
26
+ ### Added
27
+ - Allow the global Studio header to be hidden independently and restored from a fixed top-edge control without shifting the workspace layout.
28
+
29
+ ### Changed
30
+ - Hide the global Studio header by default in Zen mode, while keeping **F9** as an immediate way to exit Zen and restore the full header.
31
+
7
32
  ## [0.9.49] — 2026-08-24
8
33
 
9
34
  ### Added
package/README.md CHANGED
@@ -28,11 +28,12 @@ _The video shows an earlier version of the Studio interface. The basic workflow
28
28
 
29
29
  ## What it does
30
30
 
31
- - Opens a two-pane browser workspace: **Editor** (left) + **Response/Working/Editor Preview/Quarto Preview** (right)
31
+ - Opens a two-pane browser workspace: **Editor** (left) + **Response/Working/Editor Preview/Quarto Preview/Side questions** (right)
32
32
  - 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
33
- - Includes a global **Zen** mode for hiding secondary Studio chrome without changing the current left/right pane layout
33
+ - Includes a global **Zen** mode that hides the Studio header and secondary chrome without changing the current left/right pane layout; the header can also be hidden independently and restored from the top-right edge
34
34
  - 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
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
35
+ - 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.
36
+ - 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` keep quick mnemonic shortcuts for Response Preview, Editor Preview, and Working
36
37
  - 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
38
  - 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
39
  - 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
@@ -103,6 +104,22 @@ Run once without installing:
103
104
  pi -e https://github.com/omaclaren/pi-studio
104
105
  ```
105
106
 
107
+ ## Side questions and research context
108
+
109
+ Open **Review → Side question**, select **Side questions** in the right pane, or press **Cmd/Ctrl+Alt+Q**. A new side thread captures its starting text while keeping related-file access separate:
110
+
111
+ - **Starting text** controls what unsaved text begins the thread. The compact **Automatic: selection → heading block at cursor → nearby text** disclosure explains the fallback order; when expanded, it defines the heading boundary. The summary below reports the resolved starting text, editor line range when applicable, and character count separately from the related-file scope.
112
+ - Explicit **Editor selection only** no longer falls back to the whole document when no text is selected; the summary instead reports that no editor text is selected.
113
+ - In the initial-question and follow-up boxes, **Cmd/Ctrl+Enter** submits while plain **Enter** adds a new line. The button remains available for pointer and ordinary keyboard activation.
114
+ - **Also use files from** controls the read-only boundary available to the side agent: no other files, the document folder, the current repository, or another chosen folder.
115
+ - With **Repository** selected, **Include Git context** can capture status, staged and unstaged tracked-file changes, and up to 20 recent commit summaries. The bounded snapshot is frozen when the thread starts and exposed through fixed read-only tools; untracked contents remain available only through the existing root-confined file reader.
116
+ - **Include the current main conversation snapshot** is opt-in. Side questions and answers otherwise never enter the main Pi history; **Bring to main conversation** is the explicit handoff.
117
+ - Local context tools can map filenames, search readable text, and read selected ranges. Symlinks and traversal outside the chosen root are rejected. PDF extraction uses `pdftotext`; DOCX, ODT, and EPUB extraction uses Pandoc.
118
+ - **Allow web search** is opt-in and appears when `BRAVE_API_KEY` is available to the Pi process. Model-chosen search queries are sent to Brave Search; the side agent is instructed not to copy private local passages into queries. Web answers cite result URLs and identify when they rely on search-result snippets rather than full page content.
119
+ - **Additional Pi tools** lists eligible tools already registered by the user's installed Pi extensions. Selection is explicit, remembered locally, and frozen when the thread starts. Studio reloads only the extensions owning the selected tools into the isolated side runtime and activates only those tool names; it does not import or depend on any particular third-party extension. Gateway tools are labelled and require an additional confirmation because selecting one may expose further services configured behind it.
120
+
121
+ The current side thread is ephemeral but survives Studio browser refreshes while the same Pi Studio server remains running. **Export thread** can save the visible discussion and context summary as Markdown, copy that Markdown, open it as an unsaved editor copy, or render it to PDF or HTML. Markdown is the canonical durable format; exports omit hidden starting-text contents, inherited main-conversation contents, and raw tool output. Studio never supplies the side agent with shell or file-writing tools, and known execution/mutation surfaces are excluded from the picker. Selected third-party tools retain their own behavior, permissions, and downstream scope, so choose tools you trust for read-only research.
122
+
106
123
  ## Studio Markdown extras
107
124
 
108
125
  Studio previews standard Markdown, code fences, display math, Mermaid, and local images. When adding companion files such as generated plots or PDFs, prefer the project's existing folder convention. If there is no convention, `attachments/` is a reasonable default for newly generated assets. Use relative paths from the opened Markdown file or Studio working/resource directory, and wrap paths in angle brackets when spaces are possible:
@@ -162,6 +179,7 @@ Studio only passes icon-pack arguments when a diagram actually references `lucid
162
179
  - Installing pi-studio makes the optional `pi-studio-dark` and `pi-studio-light` themes available in pi's theme selector; it does not change your active theme.
163
180
  - Editor/code font uses a best-effort terminal-monospace match when the current terminal config exposes it; set `PI_STUDIO_FONT_MONO` to force a specific CSS `font-family` stack. Use `PI_STUDIO_FONT_UI` or `PI_STUDIO_FONT_PROSE` to override the Studio UI or rendered-preview font stacks.
164
181
  - The optional REPL view requires `tmux`. Studio can start and stop Studio-owned `pi-studio-repl-*` sessions and can mirror detected `pi-repl-*` sessions, but it will not stop external `pi-repl-*` sessions.
182
+ - Side-question web search requires `BRAVE_API_KEY`; without it, local and conversation context still work, and the web option is shown as unavailable. Side sub-sessions are deliberately read-only and can run independently while the main Pi agent is busy.
165
183
  - Full preview/PDF quality depends on `pandoc` (and `xelatex` for PDF):
166
184
  - `brew install pandoc`
167
185
  - install TeX Live/MacTeX for PDF export