- Added bash.autoBackground.enabled and bash.autoBackground.thresholdMs settings with defaults for background job behavior.
- Added auto-backgrounding support for long foreground bash commands with managed job state and timeout threshold.
- Updated bash prompts, job-protocol messages, and tool activation checks to use async and auto-background support.
- Added background bash completion integration with AsyncJobManager and end-to-end tests for short/long auto-background scenarios.
- Added richer session-export HTML rendering for tool calls, metadata badges, and todo trees.
- Added a persistent JavaScript execution tool backed by node:vm with cross-session KV/pubsub support.
- Replaced pythonExecution paths with jsExecution handling across tool labels and message rendering.
- Refactored tool-call rendering into dedicated renderers with shared helpers and fallback error handling.
- Added SQLite path parsing and candidate validation for `.sqlite`, `.db`, `.db3`, and `.sqlite3` targets in read/write flows.
- Added SQLite read operations for table lists, schema views, row lookups, paginated queries, and raw SELECT mode.
- Added SQLite write operations for insert, update-by-key, and delete-by-key using JSON5 row payloads.
- Updated selector routing to validate SQLite headers and fall back to normal file reads/writes when not databases.
- Secured read mode by enforcing query validation to block destructive SQL execution on SQLite inputs.
- Added SHORT_LIVED_GIT_CONFIG constants and withShortLivedGitConfig helper for short-lived overrides.
- Updated runCommand to route git args through short-lived config normalization and avoid duplicate -c entries.
- Added scripts/release git() helper and replaced raw release git invocations with config-safe calls.
- Added git-process-config tests asserting status and stage spawn git with disabled core.fsmonitor/untrackedCache.
- Added canonical model equivalence types, cache helpers, and registry APIs for provider variant lookup.
- Changed model resolution to apply canonical ID overrides/excludes with provider order before fallback matching.
- Added canonical and provider model views in list-models and selector UI with canonical sorting/persistence.
- Updated role/model persistence to store selectors while runtime now resolves concrete canonical-backed provider models.
- Updated the system prompt to omit time estimates and duration predictions from responses.
- Reinforced coding guidance to avoid speculative abstractions and compatibility shims unless they are needed.
- Fixed usage report generation to preserve partial data when parsing payloads are incomplete.
- Fixed planType resolution to fall back to raw `plan_type` when parsed planType is missing.
- Fixed usage metadata population to set accountId and keep the original raw payload when parsed raw output is absent.
- Fixed usage report rendering to label unlimited plans and display a clear `-- no limits` status line.
- Updated the gemini-image test harness to use CustomToolContext, ModelRegistry, and ReadonlySessionManager types.
- Expanded getHeaderValue in gemini-image tests to handle string-array header values.
- Adjusted the resolve.rs stale-selector test to use a let-else Err(err) binding.
- Clarified the fence_marker doc comment to describe CommonMark triple-marker detection semantics.
- Fixed markdown fenced code block rendering to preserve literal indentation instead of normalizing to tabs.
- Added validation to reject chunk selector operations on non-existent files with descriptive error message.
- Fixed chunk deletion to properly derive parent paths and mark ancestors with appropriate focus modes.
- Simplified path segment matching logic by removing unnecessary normalization of requested_segment parameter.
- Added comprehensive test coverage for fenced code block caret reads, indentation preservation, and file-not-found error handling.
- Reduced default image size limits to 1568px and 500KB to match Anthropic's internal thresholds.
- Optimized screenshot compression with 1024px max dimensions, 150KB budget, and 70% JPEG quality for aggressive payload reduction.
- Added fast-path optimization to skip re-encoding when images fit dimensions and are within 25% of byte budget.
- Refactored image encoding strategy to JPEG-only in quality/dimension reduction loops with improved quality ladder steps.
- Added full-path selector resolution to match untruncated chunk identifiers when they resolve uniquely.
- Extracted path segment matching logic into reusable functions for improved maintainability.
- Added test coverage for full untruncated identifier path resolution.
- Added fallback logic to resolve stale chunk selectors by matching same-parent CRC when exact selector not found.
- Fixed stale child selector reuse to match chunks by checksum for sibling chunks with identical names.
- Added condition to check for Section chunk kind with Replace operation in region nullification logic.
- Expanded documentation with critical warnings about chunk name truncation and guidance for markdown editing with whitespace preservation.
- Added designer model role for UI/UX design tasks with Gemini 3.1 Pro as default model.
- Implemented model role fallback list support enabling automatic fallback to next available model when primary is unavailable.
- Refactored model role resolution to support multiple fallback patterns per role with thinking level mapping.
- Updated designer agent to use pi/designer role alias instead of explicit model list, removing spawns configuration.
- Added test coverage for model resolver fallback patterns and designer role override preferences.
- Added test coverage for geminiImageTool X-Title header routing through OpenRouter.
- Fixed stale diagnostics being reused after unrelated file publishes by clearing cached diagnostics before refreshing file state.
- Added regression test to verify diagnostics cache is cleared when refreshing files.
- Extracted result building logic into reusable buildResult function to eliminate duplication across three code paths.
- Consolidated import of natives module to use namespace import instead of destructured imports for consistency.
- Reorganized signal timeout initialization to occur before conditional branches for clarity.
- Added test case verifying mtime-based sorting of recursive filename matches.
- Added `extractReadableFromHtml()` utility function with dual-path content extraction using Readability library and CSS selector fallback.
- Integrated Turndown library with GitHub Flavored Markdown plugin for improved HTML-to-markdown conversion supporting tables, strikethrough, and task lists.
- Refactored `getPageReadable()` action to use new extraction function, consolidating content parsing logic and improving maintainability.
- Added TypeScript type declarations for turndown-plugin-gfm module with custom Turndown rules for enhanced markdown formatting.
- Refactored chunk rendering to compute prologue and body line counts separately via new `chunk_head_body_lines()` function.
- Updated ellipsis marker format from line count to line range selection syntax (e.g., 'to expand above/below').
- Modified `render()` method signature to accept `head_lines` and `body_lines` parameters for precise line count display.
- Simplified no-changes response in chunk edit mode to omit redundant text when content matches.
- Expanded chunk-edit documentation with compound statement examples and region suffix behavior for non-code formats.
- Fixed duplicate synthetic tool results by tracking persisted tool call IDs and skipping synthesis when real results exist.
- Fixed Codex search streamed answer handling to detect and skip image placeholder text, preferring final answer.
- Added test coverage for duplicate tool result prevention in message transformation pipeline.
- Extracted diagnostic target resolution logic into new `resolveDiagnosticTargets()` utility function with glob pattern support.
- Consolidated glob pattern detection and file matching logic by replacing conditional branches with unified utility call.
- Added file existence checking with stat before glob expansion to handle bracket paths as literal targets.
- Added test coverage for bracket path handling in diagnostic target resolution.
- Simplified chunk region notation from @head/@body/@tail/@decl to ^/~ suffix format across all modules.
- Removed ChunkRegion::Tail and ChunkRegion::Decl enum variants and updated region matching logic accordingly.
- Added call-with-callback pattern detection via try_promote_call_with_callback() and trailing_callback_body() functions.
- Updated documentation and test fixtures to reflect new region selector syntax throughout codebase.
- Detect 401/403 from Copilot and rewrite to actionable re-login message,
invalidating stale credentials in the session layer (Fix 1)
- Add 9 unit tests for loginGitHubCopilot device-code flow (Fix 2)
- Centralize duplicated "opencode/1.3.15" User-Agent into a single
exported COPILOT_USER_AGENT / OPENCODE_HEADERS constant (Fix 3)
- Batch model enablement to 5-at-a-time to avoid rate limits (Fix 4)
- Restructured chunk-edit region documentation into table format for clarity and scannability.
- Clarified region semantics with concrete examples and consolidated redundant explanations.
- Enhanced chunk-edit tool documentation with clarifications on @decl region behavior and guidance for attribute/decorator modifications.
- Improved chunk edit implementation to handle @body region scanning and markdown blank-line preservation with additional test coverage.
- Added oracle model review synthesis to rate-edit-tool.py for aggregating findings across multiple model reviews.
- Updated test infrastructure to run TypeScript and Rust tests in parallel using cargo nextest with improved logging control.
- Updated TypeScript dependencies including @typescript/native-preview and typescript to latest versions.
- Extracted `raceWithAbort()` utility to pi-utils package for reuse across projects.
- Replaced local `raceAbort()` implementation with imported `raceWithAbort()` from pi-utils.
- Refactored cleanup timer to use async iterator pattern with `timers.setInterval()` instead of callback-based `setInterval()`.
- Converted `#cleanupIdleSessions()` and `#disposeSession()` from async to synchronous methods with async cleanup loop delegated to `#runCleanupLoop()`.
- Extracted large switch statement into 16 dedicated event handler methods for improved maintainability and type safety.
- Introduced AgentSessionEventHandlers type and handler dispatch map to enable compile-time verification of event coverage.
- Migrated hash API calls from Bun.hash.xxHash64() to Bun.hash() across TypeScript packages for simplified hash generation.
- Consolidated mermaid cache failure tracking by replacing separate failed Set with null values in cache Map.
- Refactored schema-based child extraction in Rust by introducing promotion_fields tracking and schema_wrapper_child() helper function.
- Updated TypeScript configuration files with reformatted arrays and added compiler options for consistency.
- Extracted tab width resolution from pi-natives to pi-utils with EditorConfig caching support.
- Made tabWidth parameter required in native text functions (visibleWidth, truncateToWidth, wrapTextWithAnsi, sliceWithWidth, extractSegments).
- Removed process-wide tab width state management from pi-natives text module.
- Consolidated wrapper node promotion logic in chunk classification with abbreviated string representations.
- Removed path-clean and pathdiff dependencies from pi-natives.
- Updated all consuming packages to import tab width functions from pi-utils and pass explicit tabWidth parameters.
- Migrated language classifiers from imperative methods to declarative semantic rule tables with ClassifierTables and StructuralOverrides.
- Extracted node shape analysis into dedicated shape module with field priority constants and helper functions for AST traversal.
- Added schema module with language-aware node metadata and thread-local language context management.
- Centralized environment variable parsing across codebase using $flag(), $envpos(), and isBunTestRuntime() utilities.
- Added PI_CHUNK_AUTOINDENT configuration to control indentation normalization in chunk read/edit operations.
- Enhanced system prompt with instruction priority, output contract, tool persistence, and completeness guidelines.
- Extracted language detection logic into dedicated module for reusability across LSP and theme subsystems.
- Unified extension-to-language mapping with dual identifiers (highlight and LSP) to eliminate duplication.
- Consolidated detectLanguageId and getLanguageFromPath into single source of truth in lang-from-path module.
- Added merge conflict detection and resolution API with hasConflicts() and conflictCount() methods to ChunkState.
- Implemented conflict marker parsing supporting standard and diff3-style formats with accept_ours() resolution.
- Extended ChunkKind enum with Hunk, Conflict, Ours, and Theirs variants for diff and merge conflict representation.
- Added virtual_content field to ChunkNode for rendering conflict branches and improved diff parsing with block-level file chunk handling.
- Implemented conflict metadata tracking across edits with validation preventing direct modifications to virtual conflict branches.
- Extended hashlineParseText to accept undefined in addition to null, preventing type errors when undefined is passed.
- Updated null check to use loose equality (==) to handle both null and undefined cases.
Ollama has supported the OpenAI Responses API since v0.6+. The Completions
stream is prone to stalling errors ("OpenAI completions stream stalled while
waiting for the next event"), especially with tool calls. The Responses API
is more robust and supports the same features.
Changes:
- pi-ai/openai-compat.ts: Changed ollamaModelManagerOptions() and
fetchOllamaNativeModels() to use api: "openai-responses" instead
of "openai-completions"
- coding-agent/model-registry.ts: Changed implicit ollama discovery
provider from "openai-completions" to "openai-responses"
Users with existing model caches should clear them after upgrading
(e.g. delete the ollama entry from ~/.omp/agent/models.db).
Pass args directly to /review to append them as additional instructions
to the generated prompt for all structured review modes (PR-style,
uncommitted, specific commit). When inline args are present, option 4
(custom editor) is suppressed from the menu. The no-UI (Task tool) path
forwards args as a focus hint.
Adds appendInstructions() helper to centralize the prompt append format.
Replace VSCode extension impersonation (client ID Iv1.b507a08c87ecfe98,
User-Agent GitHubCopilotChat/0.35.0) with the opencode OAuth app
(Ov23li8tweQw6odWQebz, User-Agent opencode/1.3.15).
Key changes:
- OAuth device flow now uses JSON body encoding and opencode headers
- GitHub OAuth token is used directly for all API requests; no JWT
exchange or refresh cycle needed
- Base URL changed from api.individual.githubcopilot.com to
api.githubcopilot.com across models.json, openai-compat.ts, and
the oauth module
- Removed proxy-ep JWT base URL extraction from github-copilot-headers.ts
and openai-compat.ts (resolveGitHubCopilotBaseUrl now passes through
the model baseUrl unchanged)
- refreshGitHubCopilotToken is now a synchronous identity return
- All 25 bundled Copilot model definitions updated to new headers/baseUrl
- Tests updated to reflect plain GitHub token format and new base URL
Existing users will need to re-authenticate once with /login github-copilot.
Move live stats (tokens, tools, duration) from the header — which scrolls
above the TUI viewport for long transcripts — to a stable Text component
placed after the viewerContainer. Stats are updated in-place via setText()
so the diff algorithm sees changes near the bottom of rendered output,
avoiding the fullRender(true) trigger when firstChanged < viewportTop.
Previously every ~150ms progress update changed the header stats line,
which sat above the viewport for large transcripts. The TUI's safety
check (firstChanged < previousContentViewportTop) forced a full screen
clear and re-render each cycle. In multiplexers (tmux/zellij) this
produced visible repetitive scrolling because scrollback is preserved
across clears.