- Added OpenCode Zen provider with API key-based authentication supporting multiple AI models.
- Added four new free models via OpenCode provider: glm-4.7-free, kimi-k2.5-free, minimax-m2.1-free, and trinity-large-preview-free.
- Added glm-4.7-flash model via Zai provider.
- Updated pricing and configuration for multiple models across Kimi, MiniMax, OpenRouter, Anthropic, Vercel AI Gateway, and Zai providers.
- Removed google/gemini-2.0-flash-exp:free from OpenRouter and stealth models from Vercel AI Gateway.
- Improved OAuth token refresh error handling to distinguish between definitive auth failures and transient errors.
- Added logic to only remove credentials for definitive failures (invalid_grant, revoked, expired tokens) while temporarily blocking credentials for transient errors like network timeouts.
- Enhanced error message handling in commit agent to display error messages when stopReason is 'error'.
- Added debug stack trace output for agent errors when DEBUG environment variable is set.
- Added grep CLI subcommand with support for pattern matching, file globbing, context lines, and multiple output modes (content, files-with-matches, count).
- Added diff syntax highlighting support with distinct colors for inserted and deleted lines in code output.
- Implemented FileReader abstraction for cross-platform file reading with mmap support and 4MB size limit.
- Refactored worker pool initialization to support both compiled and development build environments using resolveWorkerSpecifier utility.
- Enhanced markdown rendering with improved inline style context handling and blockquote formatting with text wrapping.
- Replaced external strip-ansi dependency with Bun's built-in stripANSI method across all packages.
- Added Kimi Code provider with support for both OpenAI and Anthropic API formats.
- Added kimiApiFormat configuration option to allow users to select between 'openai' and 'anthropic' API formats for Kimi Code provider.
- Added Kimi API format setting in the tools configuration tab with descriptions for each format option.
- Refactored Anthropic provider authentication logic to support multiple API endpoints including Kimi's Anthropic-compatible API.
- Updated OpenAI completions provider to route direct Kimi models to dedicated Kimi provider implementation.
- Simplified find tool API by removing separate `path` parameter and consolidating pattern parsing into a single `pattern` parameter that includes the search path.
- Added automatic recursive search for simple patterns like `*.ts` by implicitly prefixing them with `**/` when no explicit path is provided.
- Implemented `parsePatternPath()` function to intelligently extract base directory and glob pattern from user input, supporting patterns like `src/**/*.tsx`, `lib/*.json`, and `*.md`.
- Fixed rate limit issues with Kimi models by always sending max_tokens parameter, which Kimi uses for TPM calculation regardless of actual output.
- Added detection for Kimi models (kimi-code provider or moonshotai/kimi ID) to apply the max_tokens workaround.
- Consolidated box component cache state from four separate properties into a single typed Cache object with key, width, bgSample, and result fields.
- Extracted image line detection logic into centralized TERMINAL_INFO.isImageLine() method, removing duplicate containsImage() implementations from Markdown and TUI classes.
- Simplified cache validation in box component by introducing matchCache() method to compare current parameters against cached values.
- Removed trimStart() call from TerminalInfo.isImageLine() to check image protocol at line start without whitespace stripping.
- Replaced interface-based terminal capabilities with class-based TerminalInfo model.
- Converted ImageProtocol from union type to enum with escape sequence values.
- Removed detectCapabilities, getCapabilities, and resetCapabilitiesCache functions in favor of eager TERMINAL_ID and TERMINAL_INFO constants.
- Introduced TerminalId type and KNOWN_TERMINALS registry for terminal detection.
- Updated renderImage and TUI.queryCellSize to use TERMINAL_INFO directly instead of calling getCapabilities().
- Updated exports in index.ts to reflect new API surface.
- Added `get_bytes_gif()` method to PhotonImage for exporting images as GIF bytes.
- Added `get_bytes_webp()` method to PhotonImage for exporting images as lossless WebP bytes.
- Enabled 'gif' and 'webp' features for the image crate dependency.
- Added 'Open: artifact folder' menu option to debug selector for quick access to session artifacts.
- Implemented handleOpenArtifacts() method to open session artifact directories in the native file manager with cross-platform support (macOS, Windows, Linux).
- Added fs/promises import for directory existence validation.
packages/ai:
- fix: handle "sensitive" stop reason from Anthropic API
- fix: normalize tool call IDs with special characters for Responses API
- fix: add overflow detection for Bedrock, MiniMax, Kimi providers
- fix: 429 status is rate limiting, not context overflow
packages/tui:
- fix: refactored autocomplete state tracking
- fix: file autocomplete should not trigger on empty text
- fix: configurable autocomplete max visible items
- fix: improved table column width calculation with word-aware wrapping
packages/coding-agent:
- fix: preserve external config.yml edits on save (#1046 by @nicobailonMD)
- fix: resolve macOS NFD and curly quote variants in file paths
- Added `RequestOptions` interface to worker pool with support for `timeoutMs`, `signal`, and `transfer` properties.
- Added `stuckGracePeriodMs` configuration option to `WorkerPoolOptions` for graceful handling of stuck workers after timeout.
- Enhanced worker pool request method to accept `RequestOptions` object parameter instead of simple transfer array, enabling timeout and abort signal handling.
- Implemented comprehensive timeout and abort signal handling in worker pool with support for combined signals and grace period before force-terminating stuck workers.
- Removed html2text tool from coding agent in favor of native WASM html-to-markdown converter.
- Exported `RequestOptions` type from natives package public API.
- Added HTML to Markdown conversion functionality via new WASM binding in pi-natives crate with configurable options for content cleaning and image skipping.
- Exported htmlToMarkdown async function from @oh-my-pi/pi-natives package with worker pool support for efficient HTML to Markdown conversion.
- Integrated native WASM HTML to Markdown converter as the primary conversion method in fetch tool, replacing text-only rendering with markdown output.
- Added html-to-markdown-rs dependency to pi-natives crate for server-side HTML to Markdown conversion with preprocessing support.
- Added comprehensive test coverage for htmlToMarkdown function including headings, links, lists, code blocks, and conversion options.
- Added error field to LSP server status types throughout the mode context chain.
- Updated /session command to display the actual error message when an LSP server fails to start.
- Added logger.warn call during LSP warmup to log server startup failures to ~/.omp/logs/.
- Added Codex web search provider with OAuth credential management and SSE streaming support.
- Added Gemini web search provider with Google Search grounding and citation extraction.
- Extended WebSearchProvider type to include 'gemini' and 'codex' providers.
- Consolidated signal and timeout handling by replacing custom createRequestSignal utility with ptree.combineSignals across all scrapers and tools.
- Refactored ensureTool function to accept signal parameter through options object, enabling cancellation of tool installation and execution.
- Migrated all tool execution calls from Bun's $ template syntax to ptree.exec with explicit signal and error handling options.
- Simplified HTML rendering strategy in fetch.ts to use ptree.combineSignals for timeout management and added jina.ai integration as primary rendering method.
- Removed redundant abort checks throughout youtube.ts scraper, consolidating signal handling to rely on ptree.exec signal-based timeout mechanism.
- Added error handling for database initialization failures with detailed diagnostics including directory existence and writability checks.
- Improved directory creation in ensureDir() with proper error handling for EEXIST conditions and post-creation verification.
- Set restrictive file permissions (0o700) on created agent storage directories for improved security.
- Optimized applyLineResets() in TUI to use in-place array modification instead of creating new array via map().
- Added `/debug` slash command with interactive menu for bug report triage and system diagnostics.
- Added `containsImage()` method to `TerminalCapabilities` interface to detect image sequences in terminal output.
- Refactored terminal capability detection to use shared capability objects, reducing duplication and improving maintainability.
- Migrated `TUI.containsImage()` from instance method to static method delegating to capabilities detection.
- Added interactive `/debug` command with menu-driven interface for bug report triage and system diagnostics.
- Implemented CPU profiling workflow allowing users to capture performance profiles during issue reproduction.
- Added heap snapshot generation for memory issue analysis and debugging.
- Implemented debug report bundle creation with session data, logs, system info, and optional profiling artifacts.
- Added system information collection and display including OS, CPU, memory, and version details.
- Implemented artifact cache management with size statistics and cleanup functionality.
- Fixed incorrect byte and line limit calculations in file read tool that were applying user limits to total selected content instead of just user-limited content.
- Updated test to use SettingsManager.getGlobalShellConfig() instead of shell.getShellConfig() for consistent shell configuration access.
- Reorganized import statements across multiple files for consistency and alphabetical ordering.
- Changed firstLinePreviewChunks from let to const in read tool since it is only mutated via array methods.
- Refactored file reading logic to process bytes directly instead of decoding entire chunks into strings, improving memory efficiency and enabling better line boundary detection.
- Restructured line collection state management with dedicated helper functions (setupLineState, appendSegment, finalizeLine, decodeLine) for clearer control flow and byte tracking.
- Enhanced byte limit tracking to accurately count selected lines and bytes separately, fixing calculation of truncation metadata.
- Added firstLinePreview and firstLineByteLength fields to streamLinesFromFile return type to support better handling of oversized first lines.
- Improved firstLineExceedsLimit detection to use actual byte length instead of relying on empty collection state.
- Removed TUI layout engine exports from public API surface.
- Replaced Bun.file().stream() with fs/promises for manual buffer reading in file streaming.
- Added AbortSignal support to streamLinesFromFile for cancellation capability.
- Removed stdin monitoring feature that detected stalled input after 10 seconds.
- Removed cli-highlight and highlight.js dependencies from lock file.
- Rebuilt WASM module with reduced binary size (2.1% reduction).
- Extracted process management utilities from coding-agent shell module into dedicated procmgr module in utils package.
- Migrated shell configuration retrieval to SettingsManager class with new getGlobalShellConfig() static method.
- Replaced custom killProcessTree() implementation with new terminate() function supporting graceful shutdown with timeout and AbortSignal.
- Updated ptree.ChildProcess to use generic type parameter for input stream masking and delegated process termination to procmgr.terminate().
- Centralized process management across coding-agent modules to use SettingsManager and procmgr utilities instead of standalone shell functions.
- Added native syntax highlighting module powered by syntect library with ANSI color output support.
- Implemented highlightCode() function that applies syntax highlighting to code with language detection and customizable color themes.
- Implemented supportsLanguage() function to check if a given programming language is supported for syntax highlighting.
- Implemented getSupportedLanguages() function that returns list of all supported language identifiers.
- Replaced cli-highlight dependency with native syntect-based highlighting in coding-agent theme module.
- Added comprehensive language alias mappings supporting 50+ programming languages including TypeScript, Python, Rust, Go, C/C++, and web languages.
- Added stdin monitoring to detect stalled input events and log warnings when no input is received for 10 seconds.
- Added private methods startStdinMonitor() and stopStdinMonitor() to manage stdin event monitoring lifecycle.
- Added lastStdinEvent and stdinMonitor instance variables to track stdin activity.
Multi-line bash commands (e.g., for loops with newlines) were being passed
as single "lines" to renderOutputBlock. Since visibleWidth() treats newlines
as width 0, truncateToWidth() calculated incorrect truncation points. The
result was rendered lines with embedded newlines that exceeded terminal width,
causing "Rendered line N exceeds terminal width" crashes.
Split section lines by newlines before processing so each line gets properly
truncated and wrapped with box borders.
- Renamed package directory from packages/pi-utils to packages/utils.
- Updated all path aliases and references in tsconfig.base.json to reflect new package location.
- Updated workspace references in bun.lock and package.json to point to new packages/utils directory.
- Updated documentation and build scripts to reference the renamed utils package.
- Added documentation for new `packages/natives` WASM bindings package.
- Added documentation for new `crates/pi-natives` Rust WASM crate.
- Reformatted Commands section in AGENTS.md as a structured table for clarity.
- Updated package structure table with improved formatting and alignment.
- Added Rust language badge to README.md.
- Fixed LSP servers showing as 'unknown' in status display when server warmup fails by using index-based lookup to correctly extract server name and file types.
- Fixed Read tool loading entire file into memory when offset/limit was specified by implementing streaming line-by-line processing that only collects requested range.
- Fixed slash command autocomplete applying stale completions when typing quickly by adding staleness check before applying completion on Enter/Return.
- Reorganized npm scripts to follow consistent naming pattern with separate TypeScript and Rust variants for check, lint, fmt, and fix operations.
- Updated release script to properly handle Rust workspace version updates in Cargo.toml files and regenerate lockfiles.
The nullish coalescing operator (??) was treating null as a fallback
trigger, causing getAskTimeout()'s null return value (meaning 'disabled')
to be replaced with DEFAULT_ASK_TIMEOUT_MS (30000ms).
Now explicitly checks for undefined to distinguish between:
- undefined: settingsManager unavailable → use default
- null: user explicitly disabled timeout → preserve null
- number: user-set timeout → use that value
- Added native text utilities in pi-natives (visible width, truncation, slicing, segment extraction)
- Wired pi-tui to use native implementations with short-string JS fast path
- Optimized key matching via cached parsed key ids
- Refactored visual truncation to reuse Text instances
- Reduced theme color lookups by switching from Map to plain records
- Regenerated WASM artifacts
Benchmarks (after vs before, lower is better):
- truncateToWidth/ansi: 20.37ms vs 38.13ms (2000 iters)
- sliceWithWidth/ansi: 5.12ms vs 20.39ms
- extractSegments/ansi: 8.92ms vs 27.60ms
- truncateToVisualLines: 3.51ms vs 411.55ms (500 iters)
- visibleWidth/ansi: 0.24ms vs 0.31ms