pi-plus 0.1.40 → 0.1.42

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,7 @@
4
4
 
5
5
  ### Added
6
6
 
7
+ - Auto-fold history in the interactive TUI (`src/coding-agent/ui/auto-fold-history.ts`, installed via a side-effect import in the `main.ts` wrapper): the transcript folds on a rolling basis — when the agent starts a new assistant message mid-run (`handleEvent` prototype patch on `message_start`), that step's thinking and finished tool rows collapse (thinking to the "Thinking..." label, tools to their standard per-tool preview), and when a new user message enters the chat (`addMessageToChat` prototype patch) all previous turns fold. The live step is excluded by identity (streaming assistant component + in-flight `pendingTools`), so only completed content folds while output is still streaming; resume and compaction replays flow through the same `addMessageToChat` chokepoint, so everything before the last user turn is folded at first paint. `toolOutputExpanded` is synced to the folded state (one ctrl+o re-expands everything, no dead first press, until the next fold); `hideThinkingBlock` is left alone so the current step's thinking stays visible — ctrl+t shows thinking everywhere and the next fold refolds. Clicking a folded block re-opens just that one. Opt out with `PI_AUTO_FOLD_HISTORY=0`; verbose startup never folds. CLI-only: `pi-plus-sdk` hosts do their own content folding.
7
8
  - The fancy content-change diff extension (`pi-plus-fancy-diff`): the TUI rendering of `edit` and `write` is taken over via `registerToolRenderer` — diff bodies are syntax-highlighted (upstream's cli-highlight pipeline, by file extension), markers are colored `+`/`-` over a dim line-number gutter, the header carries `+N −M` change stats and a language badge, 1:1 modified lines get bold word-level emphasis, and elided context shows a `⋮` separator. A `write` that overwrites an existing file now renders an old-vs-new diff: the pre-image is captured by a `tool_call` handler before execution (LRU-bounded, 256 KB per-file cap); new files keep the streaming content preview. Errors, restored sessions without a pre-image, and all other tools fall back to upstream rendering. No background fills anywhere, consistent with plain tool blocks.
8
9
  - The web search extension (`pi-plus-web-search`, shared core `packages/plus/src/extensions/web-search/`) is registered in the `pipi` CLI: `WebSearch` searches the web through the provider chain selected by `WEB_SEARCH_PROVIDER`/`*_API_KEY` env vars (keyless DuckDuckGo fallback last) and `WebFetch` reads a URL as text, both returning citation-ready results.
9
10
  - The `/init` command (shared core, `packages/plus/src/extensions/init/`): analyzes the codebase and creates `AGENTS.md` at the cwd root, or suggests improvements when it already exists; pi loads `AGENTS.md` automatically.
package/README.md CHANGED
@@ -24,6 +24,7 @@ The context-detection/compaction/reasoning overrides and the eleven non-TUI exte
24
24
  7. **Tab title + busy spinner** (`src/extensions/tab-title/`) — the terminal window/tab title brands as `pi+ - [sessionName -] cwdBasename` with a braille spinner while the agent or compaction is working. TUI mode only.
25
25
  8. **Plain tool blocks** (`src/extensions/plain-tools/`) — strips background fills from tool result blocks so tool status reads as text (words, never colored blocks).
26
26
  9. **Fancy content-change diffs** (`src/extensions/fancy-diff/`) — takes over the TUI rendering of `edit` and `write`: syntax-highlighted diff bodies, colored +/- markers, a dim line-number gutter, `+N −M` change stats with a language badge, bold word-level emphasis on modified lines, and a ⋮ separator for elided context. A `write` that overwrites an existing file renders as an old-vs-new diff (the pre-image is captured in a `tool_call` handler before execution; new files keep the streaming content preview). No background fills, consistent with plain tool blocks.
27
+ 10. **Auto-fold history** (`src/coding-agent/ui/auto-fold-history.ts`) — rolling fold of the transcript: as the agent starts each new assistant message mid-run, the previous step's thinking and finished tool rows collapse (thinking to the "Thinking..." label, tools back to their standard preview), and a new user message folds all previous turns. The live step (streaming assistant message + in-flight tools) is always excluded, so output stays open while it's still relevant; resume and compaction replays fold everything before the last user turn. ctrl+o still re-expands everything (the fold keeps the global expand flag in sync with what's visible, so no dead press) and ctrl+t shows thinking everywhere until the next fold; clicks re-open a single folded block. Disable with `PI_AUTO_FOLD_HISTORY=0`; verbose startup never folds. CLI-only — `pi-plus-sdk` hosts (e.g. the desktop app) do their own folding.
27
28
 
28
29
  The CLI identifies as **`pipi`** (pi-plus) in CLI text via the shared config wrapper's
29
30
  `APP_NAME` shadow; the terminal tab title brands as **`pi+`** via `APP_TITLE`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-plus",
3
- "version": "0.1.40",
3
+ "version": "0.1.42",
4
4
  "description": "pi coding agent with the pi-plus override layer (pipi CLI)",
5
5
  "type": "module",
6
6
  "piConfig": {