pi-plus 0.1.43 → 0.1.44

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.
Files changed (3) hide show
  1. package/CHANGELOG.md +1 -1
  2. package/package.json +1 -1
  3. package/pipi.js +4 -4
package/CHANGELOG.md CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
  - The session change report extension (`pi-plus-changes`, `src/extensions/changes/`): `/changes` prints the cumulative content diff of every file the agent changed this session — including files `git diff` cannot show, since brand-new (untracked) files render as all-added diffs and deletions as all-removed. A `tool_call` handler snapshots each edited/overwritten file's original content at the agent's first touch (insertion-ordered ledger, 200-path and 256 KB-per-file caps; failures are swallowed so a bad path never blocks the tool, and the file simply goes untracked with a note entry). On demand the baselines are diffed against the current files on disk (`generateDiffString`), edits reverted to their baseline drop out, diff bodies cap at 400 lines with a muted tail note, and the report appends as a custom transcript entry rendered with the fancy-diff pipeline (per-file header with `+N −M` stats and language badge over the `changes — N files +X −Y` summary; custom entries never enter LLM context and persist in the session file, so restored sessions re-render past reports with the current theme). An optional argument filters tracked paths by case-insensitive substring (`/changes src/foo`). Changes made through the `bash` tool are not tracked; TUI mode only.
8
8
  - 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 a "Thinking... (ctrl+o to expand)" hint 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. thinking folds and unfolds exactly like tool output (one shared state model): the fold syncs both flags — `toolOutputExpanded` to false and `hideThinkingBlock` to true — so neither ctrl+o nor ctrl+t ever burns a dead press, and new components inherit them, meaning after a fold a freshly created tool row starts collapsed and a freshly created assistant message starts with hidden thinking (mid-run included; ctrl+o, ctrl+t or a click reveals it). A `setToolsExpanded` prototype patch makes ctrl+o the whole-transcript toggle for both kinds — the thinking sweep covers every assistant component including the streaming one, mirroring upstream's no-exclusion tool sweep — expanding restores the plain "Thinking..." label, collapsing re-folds with the hint and drives `hideThinkingBlock` in lockstep. Clicking a folded block re-opens just that one. Opt out with `PI_AUTO_FOLD_HISTORY=0` (ctrl+o then behaves exactly like upstream, tool output only); verbose startup never folds. CLI-only: `pi-plus-sdk` hosts do their own content folding.
9
- - 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.
9
+ - 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. Changed lines carry a soft full-row background fill of their diff color and the actually-changed words inside a modified line a stronger one (both mixed from the theme's diff tokens, git-delta style); context lines, the `⋮` separator, and headers stay unfilled, and tool status blocks remain fill-free per the plain-tools house style.
10
10
  - 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.
11
11
  - 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.
12
12
  - `pipi profile add <name> -p <provider>` with no token/model/url/thinking/--set now invokes that provider's interactive login after saving the profile: the OAuth login page opens in the browser (or the API-key setup prompts run in the terminal) and the credential is persisted into the profile's isolated agent dir (`~/.pi/pi-hub/profiles/<name>/auth.json`), so the profile is ready to launch. A cancelled or failed login keeps the profile and suggests `pipi profile update <name> -t <key>`. The CLI injects the flow via hub's `dispatchHubCommand` `login` hook; the flow itself lives in the shared core (`packages/plus/src/auth/login.ts`).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-plus",
3
- "version": "0.1.43",
3
+ "version": "0.1.44",
4
4
  "description": "pi coding agent with the pi-plus override layer (pipi CLI)",
5
5
  "type": "module",
6
6
  "piConfig": {