From 02deffdcfb5f5c2d6a01d94bbc4973e6f0c2565f Mon Sep 17 00:00:00 2001 From: roboomp Date: Mon, 15 Jun 2026 06:04:35 +0000 Subject: [PATCH] style: bun run fix --- packages/coding-agent/CHANGELOG.md | 86 +++++++++++------------------- packages/collab-web/CHANGELOG.md | 5 -- 2 files changed, 31 insertions(+), 60 deletions(-) diff --git a/packages/coding-agent/CHANGELOG.md b/packages/coding-agent/CHANGELOG.md index e3987dd49..dae034fd7 100644 --- a/packages/coding-agent/CHANGELOG.md +++ b/packages/coding-agent/CHANGELOG.md @@ -2,6 +2,15 @@ ## [Unreleased] +### Breaking Changes + +- **Settings:** `hooks` and `customTools` arrays replaced with single `extensions` array +- **CLI:** `--hook` and `--tool` flags replaced with `--extension` / `-e` +- **Directories:** `hooks/`, `tools/` → `extensions/`; `commands/` → `prompts/` +- **Types:** See type renames above +- **SDK:** See SDK migration above +- **Key detection functions removed from `@mariozechner/pi-tui`**: All `isXxx()` key detection functions (`isEnter()`, `isEscape()`, `isCtrlC()`, etc.) have been removed. Use `matchesKey(data, keyId)` instead (e.g., `matchesKey(data, "enter")`, `matchesKey(data, "ctrl+c")`). This affects hooks and custom tools that use `ctx.ui.custom()` with keyboard input handling. ([#405](https://github.com/badlogic/pi-mono/pull/405)) + ### Added - Added `WebSearchProviderError` class with HTTP status for actionable provider error messages @@ -13,6 +22,17 @@ - Alt+Enter keybind to queue follow-up messages while agent is streaming - `Theme` and `ThemeColor` types now exported for hooks using `ctx.ui.custom()` - Terminal window title now displays "pi - dirname" to identify which project session you're in ([#407](https://github.com/badlogic/pi-mono/pull/407) by [@kaofelix](https://github.com/kaofelix)) +- Hook API: `ctx.ui.setTitle(title)` allows hooks to set the terminal window/tab title ([#446](https://github.com/badlogic/pi-mono/pull/446) by [@aliou](https://github.com/aliou)) +- Hook API: `before_agent_start` handlers can now return `systemPromptAppend` to dynamically append text to the system prompt for that turn. Multiple hooks' appends are concatenated. +- Hook API: `before_agent_start` handlers can now return multiple messages (all are injected, not just the first) +- New example hook: `tools.ts` - Interactive `/tools` command to enable/disable tools with session persistence +- New example hook: `pirate.ts` - Demonstrates `systemPromptAppend` to make the agent speak like a pirate +- Tool registry now contains all built-in tools (read, bash, edit, write, grep, find, ls) even when `--tools` limits the initially active set. Hooks can enable any tool from the registry via `pi.setActiveTools()`. +- System prompt now automatically rebuilds when tools change via `setActiveTools()`, updating tool descriptions and guidelines to match the new tool set +- Hook errors now display full stack traces for easier debugging +- Clipboard image paste support via `Ctrl+V`. Images are saved to a temp file and attached to the message. Works on macOS, Windows, and Linux (X11). ([#419](https://github.com/badlogic/pi-mono/issues/419)) +- Configurable keybindings via `~/.pi/agent/keybindings.json`. All keyboard shortcuts (editor navigation, deletion, app actions like model cycling, etc.) can now be customized. Supports multiple bindings per action. ([#405](https://github.com/badlogic/pi-mono/pull/405) by [@hjanuschka](https://github.com/hjanuschka)) +- `/quit` and `/exit` slash commands to gracefully exit the application. Unlike double Ctrl+C, these properly await hook and custom tool cleanup handlers before exiting. ([#426](https://github.com/badlogic/pi-mono/pull/426) by [@ben-vargas](https://github.com/ben-vargas)) ### Changed @@ -38,6 +58,14 @@ - RPC `prompt` command now accepts optional `streamingBehavior` field ([#420](https://github.com/badlogic/pi-mono/issues/420)) - Editor component now uses word wrapping instead of character-level wrapping for better readability ([#382](https://github.com/badlogic/pi-mono/pull/382) by [@nickseelert](https://github.com/nickseelert)) +- Extensions can have their own `package.json` with dependencies (resolved via jiti) +- Documentation: `docs/hooks.md` and `docs/custom-tools.md` merged into `docs/extensions.md` +- Examples: `examples/hooks/` and `examples/custom-tools/` merged into `examples/extensions/` +- README: Extensions section expanded with custom tools, commands, events, state persistence, shortcuts, flags, and UI examples +- SDK: `customTools` option now accepts `ToolDefinition[]` directly (simplified from `Array<{ path?, tool }>`) +- SDK: `extensions` option accepts `ExtensionFactory[]` for inline extensions +- SDK: `additionalExtensionPaths` replaces both `additionalHookPaths` and `additionalCustomToolPaths` +- Removed image placeholders after copy & paste, replaced with inserting image file paths directly. ([#442](https://github.com/badlogic/pi-mono/pull/442) by [@mitsuhiko](https://github.com/mitsuhiko)) ### Fixed @@ -56,6 +84,9 @@ - Shift+Space, Shift+Backspace, and Shift+Delete now work correctly in Kitty-protocol terminals (Kitty, WezTerm, etc.) instead of being silently ignored ([#411](https://github.com/badlogic/pi-mono/pull/411) by [@nathyong](https://github.com/nathyong)) - `AgentSession.prompt()` now throws if called while the agent is already streaming, preventing race conditions. Use `steer()` or `followUp()` to queue messages during streaming. - Ctrl+C now works like Escape in selector components, so mashing Ctrl+C will eventually close the program ([#400](https://github.com/badlogic/pi-mono/pull/400) by [@mitsuhiko](https://github.com/mitsuhiko)) +- Fixed potential text decoding issues in bash executor by using streaming TextDecoder instead of Buffer.toString() +- External editor (Ctrl-G) now shows full pasted content instead of `[paste #N ...]` placeholders ([#444](https://github.com/badlogic/pi-mono/pull/444) by [@aliou](https://github.com/aliou)) +- Subagent example README referenced incorrect filename `subagent.ts` instead of `index.ts` ([#427](https://github.com/badlogic/pi-mono/pull/427) by [@Whamp](https://github.com/Whamp)) ## [15.13.1] - 2026-06-15 @@ -10166,71 +10197,16 @@ pi --extension ./safety.ts -e ./todo.ts **Automatic.** Session version bumped from 2 to 3. Existing sessions are migrated on first load: - Message role `"hookMessage"` → `"custom"` -### Breaking Changes - -- **Settings:** `hooks` and `customTools` arrays replaced with single `extensions` array -- **CLI:** `--hook` and `--tool` flags replaced with `--extension` / `-e` -- **Directories:** `hooks/`, `tools/` → `extensions/`; `commands/` → `prompts/` -- **Types:** See type renames above -- **SDK:** See SDK migration above - -### Changed - -- Extensions can have their own `package.json` with dependencies (resolved via jiti) -- Documentation: `docs/hooks.md` and `docs/custom-tools.md` merged into `docs/extensions.md` -- Examples: `examples/hooks/` and `examples/custom-tools/` merged into `examples/extensions/` -- README: Extensions section expanded with custom tools, commands, events, state persistence, shortcuts, flags, and UI examples -- SDK: `customTools` option now accepts `ToolDefinition[]` directly (simplified from `Array<{ path?, tool }>`) -- SDK: `extensions` option accepts `ExtensionFactory[]` for inline extensions -- SDK: `additionalExtensionPaths` replaces both `additionalHookPaths` and `additionalCustomToolPaths` - ## [0.34.1] - 2026-01-04 -### Added - -- Hook API: `ctx.ui.setTitle(title)` allows hooks to set the terminal window/tab title ([#446](https://github.com/badlogic/pi-mono/pull/446) by [@aliou](https://github.com/aliou)) - ### Changed - Expanded keybinding documentation to list all 32 supported symbol keys with notes on ctrl+symbol behavior ([#450](https://github.com/badlogic/pi-mono/pull/450) by [@kaofelix](https://github.com/kaofelix)) ## [0.34.0] - 2026-01-04 -### Added - -- Hook API: `before_agent_start` handlers can now return `systemPromptAppend` to dynamically append text to the system prompt for that turn. Multiple hooks' appends are concatenated. -- Hook API: `before_agent_start` handlers can now return multiple messages (all are injected, not just the first) -- New example hook: `tools.ts` - Interactive `/tools` command to enable/disable tools with session persistence -- New example hook: `pirate.ts` - Demonstrates `systemPromptAppend` to make the agent speak like a pirate -- Tool registry now contains all built-in tools (read, bash, edit, write, grep, find, ls) even when `--tools` limits the initially active set. Hooks can enable any tool from the registry via `pi.setActiveTools()`. -- System prompt now automatically rebuilds when tools change via `setActiveTools()`, updating tool descriptions and guidelines to match the new tool set -- Hook errors now display full stack traces for easier debugging - -### Changed - -- Removed image placeholders after copy & paste, replaced with inserting image file paths directly. ([#442](https://github.com/badlogic/pi-mono/pull/442) by [@mitsuhiko](https://github.com/mitsuhiko)) - -### Fixed - -- Fixed potential text decoding issues in bash executor by using streaming TextDecoder instead of Buffer.toString() -- External editor (Ctrl-G) now shows full pasted content instead of `[paste #N ...]` placeholders ([#444](https://github.com/badlogic/pi-mono/pull/444) by [@aliou](https://github.com/aliou)) - ## [0.33.0] - 2026-01-04 -### Breaking Changes - -- **Key detection functions removed from `@mariozechner/pi-tui`**: All `isXxx()` key detection functions (`isEnter()`, `isEscape()`, `isCtrlC()`, etc.) have been removed. Use `matchesKey(data, keyId)` instead (e.g., `matchesKey(data, "enter")`, `matchesKey(data, "ctrl+c")`). This affects hooks and custom tools that use `ctx.ui.custom()` with keyboard input handling. ([#405](https://github.com/badlogic/pi-mono/pull/405)) - -### Added - -- Clipboard image paste support via `Ctrl+V`. Images are saved to a temp file and attached to the message. Works on macOS, Windows, and Linux (X11). ([#419](https://github.com/badlogic/pi-mono/issues/419)) -- Configurable keybindings via `~/.pi/agent/keybindings.json`. All keyboard shortcuts (editor navigation, deletion, app actions like model cycling, etc.) can now be customized. Supports multiple bindings per action. ([#405](https://github.com/badlogic/pi-mono/pull/405) by [@hjanuschka](https://github.com/hjanuschka)) -- `/quit` and `/exit` slash commands to gracefully exit the application. Unlike double Ctrl+C, these properly await hook and custom tool cleanup handlers before exiting. ([#426](https://github.com/badlogic/pi-mono/pull/426) by [@ben-vargas](https://github.com/ben-vargas)) - -### Fixed - -- Subagent example README referenced incorrect filename `subagent.ts` instead of `index.ts` ([#427](https://github.com/badlogic/pi-mono/pull/427) by [@Whamp](https://github.com/Whamp)) - ## [0.32.3] - 2026-01-03 ## [0.32.2] - 2026-01-03 diff --git a/packages/collab-web/CHANGELOG.md b/packages/collab-web/CHANGELOG.md index 89f49adb1..e48ca265e 100644 --- a/packages/collab-web/CHANGELOG.md +++ b/packages/collab-web/CHANGELOG.md @@ -22,12 +22,7 @@ ### Fixed -- Fixed mobile layout issues where the entire chat flow would overflow horizontally and text was rendered too large on iOS Safari (by setting `text-size-adjust: 100%`) - Pinned the app shell grid to a single `minmax(0, 1fr)` column so a long session title can no longer set a min-content floor that pushes the header, transcript, and composer wider than narrow or in-app mobile viewports; the title now ellipsizes instead of clipping every row's right edge -- Made transcript rows stack vertically on small screens to optimize reading space, and prevented grid track expansion -- Hid non-essential metadata (such as the model name, thinking level, and working directory path) and context gauge tracks on mobile headers to prevent overflow -- Wrapped composer button labels to display icon-only on mobile devices for a more compact and readable layout -- Made the connect screen, ended session card, and notification toasts fully responsive for smaller device viewports ## [15.12.4] - 2026-06-13