Commit Graph

962 Commits

Author SHA1 Message Date
can1357 ac051daf90 feat(coding-agent): added clipboard export option to /export command 2026-01-03 04:05:00 +01:00
can1357 776ab5eb24 chore: bump version to 1.341.0 2026-01-03 04:00:16 +01:00
can1357 015f2c7e54 feat(agent): added interruptMode to control queued message timing
- Added interruptMode option to control when queued messages interrupt tool execution.
- Implemented "immediate" mode (default) to check queue after each tool and interrupt remaining tools.
- Implemented "wait" mode to defer queue processing until the entire turn completes.
- Exposed interruptMode configuration in interactive settings UI with immediate/wait options.
- Wired interrupt mode through AgentSession and SDK to enable runtime configuration and persistence.
2026-01-03 03:56:13 +01:00
can1357 4f8df6b79f refactor(coding-agent): renamed small to smol consistently
- Renamed SMALL_MODEL_PRIORITY to SMOL_MODEL_PRIORITY
- Renamed findSmallModel to findSmolModel
- Updated all role strings from 'small' to 'smol'
- Updated UI labels and comments
2026-01-03 03:46:45 +01:00
can1357 60f39f8382 feat(coding-agent): added CLI args and env vars for model role overrides
- Added --smol and --slow CLI args for ephemeral model role overrides
- Added PI_SMOL_MODEL and PI_SLOW_MODEL env var support
- Overrides are applied at runtime without persisting to settings.json
2026-01-03 03:40:24 +01:00
can1357 4b73cb6a54 feat(coding-agent): added slow model role for comprehensive reasoning
- Added pi/smol alias for explore agent (fast/cheap model)
- Added pi/slow alias for reviewer agent (reasoning/codex model)
- Added L key binding in model selector to set slow model
- Added 🧠 marker for slow model in selector
- Slow model priority chain: gpt-5.2-codex > codex > gpt > opus > pro
2026-01-03 03:36:51 +01:00
can1357 003a19bdaa feat(coding-agent): added model roles for default and small model configuration
- Settings now use modelRoles map (e.g., { default: 'anthropic/claude-sonnet-4-5', small: 'anthropic/claude-haiku-4-5' })
- Session persistence uses 'provider/modelId' string format with optional role field
- Model selector: Enter sets default, S sets small, Escape closes
- Added role markers in selector: checkmark for default, lightning bolt for small
- Task tool supports pi/<role> aliases (e.g., model: pi/small, haiku, flash, mini)
- Title generation uses configured small model with auto-discovery fallback
- Explore agent now uses pi/small as primary model preference
2026-01-03 03:33:02 +01:00
can1357 206b7b06fd fix(coding-agent): made LSP idle timeout configurable and disabled by default 2026-01-03 03:12:13 +01:00
can1357 ebcdf50e48 feat(coding-agent): added auto session titles for better identification
- Added automatic session title generation using small models (Haiku/GPT-4o-mini/Flash) to improve session identification.
- Implemented terminal window title updates to display current session context.
- Updated session selector to show title with dimmed first message preview for better session browsing.
- Extended SessionInfo and SessionHeader interfaces to persist and display generated titles.
- Added title model preference hierarchy with fallback to any available model for reliability.
2026-01-03 03:07:03 +01:00
can1357 ccc0a8b6c8 feat(coding-agent): added LSP format-on-write with server warmup
- Added LSP format on write to automatically format code files using language server formatters after writing.
- Implemented LSP server warmup at startup to avoid cold-start delays when first writing files.
- Added LSP server status display in welcome banner to show which language servers are active and ready.
- Fixed recent sessions display in welcome banner which was never wired up.
- Improved grep tool description to document pagination options and clarify recursive search behavior.
2026-01-03 02:58:30 +01:00
can1357 9262bbe9eb feat(coding-agent): added LSP configs for 40+ languages and edit fuzzy matching
- Added edit fuzzy match setting to allow users to control whitespace/indentation tolerance in the edit tool.
- Added comprehensive LSP server configurations for 40+ languages including Rust, Go, Python, Java, Kotlin, Scala, Haskell, OCaml, Elixir, Ruby, PHP, C#, Lua, Nix, and more.
- Extended LSP config file search paths to include lsp.json, .lsp.json in project root, .pi/ subdirectory, and user-level configs in ~/.pi/ and home directory.
- Increased LSP diagnostics timeout from 2000ms to 5000ms to accommodate slower language servers.
2026-01-03 02:51:21 +01:00
can1357 45df371fdc feat(coding-agent): added LSP diagnostics on write for immediate feedback
- Added LSP diagnostics integration to write tool for immediate feedback on syntax errors and type issues after writing code files.
- Implemented multi-server LSP diagnostics to query all applicable language servers (e.g., TypeScript + Biome) and merge results for comprehensive error reporting.
- Added Biome language server configuration to enable combined type-checking and linting diagnostics for TypeScript/JavaScript projects.
- Introduced lsp.diagnosticsOnWrite setting to allow users to control automatic diagnostics behavior.
- Enhanced TUI tool execution component to display LSP diagnostics with color-coded severity indicators.
2026-01-03 02:44:16 +01:00
can1357 2b3fff9e9e chore: bump version to 1.340.0 and update changelogs 2026-01-03 01:34:58 +01:00
can1357 ed03480309 refactor(coding-agent): replaced vendored highlight.js with CDN to reduce bundle size
- Replaced vendored highlight.js with CDN-hosted version to reduce bundle size by ~1200 lines.
- Added CSS, JS, and HTML minification functions to reduce exported file size.
- Implemented caching for minified template and JS assets to avoid redundant processing.
- Updated share preview URL to use gistpreview.github.io for session sharing.
2026-01-03 01:31:15 +01:00
can1357 9debb0f8c6 feat(coding-agent): add MCP project config setting and Exa auto-filtering 2026-01-03 01:04:55 +01:00
can1357 2ee73541e0 chore: add [Unreleased] section for next cycle 2026-01-03 00:31:51 +01:00
can1357 720aae421f chore: bump version to 1.338.0 and update changelogs 2026-01-03 00:30:33 +01:00
can1357 ee28916b57 feat(coding-agent): add bash interceptor setting and refactor settings UI
- Add bash interceptor setting (disabled by default) to block shell commands
  that have dedicated tools (grep, cat, find, etc.)
- Refactor settings UI to declarative definitions in settings-defs.ts
- Shell detection now respects $SHELL env var before falling back to bash/sh
- Tool binary detection uses Bun.which() instead of spawning processes
- Fix CLI help text to accurately list all default tools
2026-01-03 00:29:28 +01:00
can1357 7db3b35dc4 refactor(coding-agent): extracted settings defs for single source
- Introduced declarative settings definitions to eliminate duplicated setting logic across UI and handlers.
- Extracted settings configuration into settings-defs.ts for single-source-of-truth maintenance.
- Simplified SettingsSelectorComponent to generate UI from definitions rather than hardcoded items.
- Added bash interceptor toggle to allow users to control shell command interception behavior.
- Updated CLI help text to reflect all available tools with accurate default states.
- Consolidated settings change handling into unified handler dispatching by setting ID.
2026-01-03 00:28:51 +01:00
can1357 7cc69d5d3e refactor(coding-agent): simplified shell and tool detection with Bun APIs
- Replaced hardcoded shell path detection with user's $SHELL preference for better environment compatibility.
- Simplified commandExists function to use Bun.which instead of spawning processes for faster tool detection.
- Updated getToolPath to return full binary path from Bun.which for more reliable tool resolution.
2026-01-03 00:16:25 +01:00
can1357 73efb9b520 chore: bump version to 1.337.1 and update changelogs 2026-01-02 23:05:37 +01:00
can1357 084de48d4b fix: updated CI workflows and TypeBox validation for build compatibility
- Updated CI workflows to include explicit coding-agent build step for proper binary compilation.
- Changed TypeBox validation from ts-expect-error to explicit any cast to resolve CJS/ESM type mismatch.
2026-01-02 22:55:00 +01:00
can1357 2665c03402 fix: corrected test expectations and template string interpolation 2026-01-02 22:52:27 +01:00
can1357 ddc240592f ci(workflows): consolidated release automation into unified publish workflow
- Replaced build-binaries workflow with unified publish workflow to consolidate release automation.
- Added matrix-based parallel binary builds across platforms for faster release cycles.
- Simplified CI workflow by removing concurrency settings and adding CLI smoke tests.
- Added npm publish step with provenance support for secure package distribution.
- Introduced skip_npm input to allow binary-only releases when needed.
2026-01-02 22:40:25 +01:00
can1357 26fd43d999 refactor(coding-agent): improved process cleanup with tree kill
- Replaced process group kill with descendant-aware tree traversal to handle non-leader processes.
- Added pgrep-based child discovery with /proc fallback for broader Linux compatibility.
- Introduced optional grace period parameter to allow SIGTERM before SIGKILL for graceful shutdown.
- Simplified focus return value in interactive mode for consistency.
2026-01-02 22:33:26 +01:00
can1357 e43e6bc236 feat(tui): added TabBar component for horizontal tab navigation
- Added TabBar component to enable horizontal tab navigation with keyboard support.
- Refactored settings selector to use tabbed interface for better organization of Config, Exa, and Plugins sections.
- Added Shift+Space handling via Kitty protocol to fix space insertion in editor.
- Removed redundant LSP explanation text from system prompt for conciseness.
2026-01-02 22:31:27 +01:00
can1357 cfb99df249 feat(coding-agent): added specialized Exa tools with granular toggles
- Added specialized Exa web search tools for deep search, code context, URL crawling, LinkedIn, and company research.
- Implemented settings UI for granular control over Exa tool availability with per-feature toggles.
- Changed Exa addon defaults to disabled to prevent unexpected API usage for LinkedIn, company, researcher, and websets features.
- Added settings manager methods to persist individual Exa feature preferences.
2026-01-02 22:26:21 +01:00
can1357 afcae56269 build(deps): added tsgo for faster type checking across packages
- Added @typescript/native-preview dependency to enable faster type checking with tsgo.
- Updated check scripts across packages to use tsgo instead of tsc for improved performance.
- Extended root check script to include coding-agent package type checking.
2026-01-02 22:18:45 +01:00
can1357 fbae5cbb0d refactor(coding-agent): simplified toolset and enhanced navigation
- Removed ast and replace tools to simplify toolset and reduce maintenance overhead.
- Added LSP call hierarchy support (incoming_calls, outgoing_calls) for better code navigation.
- Added Exa as web search provider alongside Anthropic and Perplexity for broader search options.
- Enhanced tool descriptions with detailed usage guidelines to improve agent tool selection.
- Simplified task tool by removing single-mode execution and agentScope parameter.
- Added GitHub tree rendering and improved web-fetch documentation for better URL handling.
2026-01-02 22:13:05 +01:00
can1357 8ca26c58a1 feat(coding-agent): added bash interception to guide tool selection
- Added bash interception layer to redirect shell patterns like grep/cat/find to specialized tools for better results.
- Introduced anti-bash rules in system prompt to guide LLM toward preferred tool hierarchy (lsp > ast > grep > find > read > edit > bash).
- Enhanced LSP tool description to emphasize semantic code queries over text-based grep searches.
- Simplified edit tool by enabling fuzzy matching by default to reduce friction from whitespace mismatches.
- Updated error messages to provide context-aware guidance based on fuzzy matching state.
2026-01-02 21:44:49 +01:00
can1357 eac529bc30 feat(coding-agent): added fuzzy matching to handle indentation variance
- Added fuzzy matching with Levenshtein distance to handle whitespace and indentation differences in edit operations.
- Implemented configurable similarity threshold (default 95%) to balance precision with flexibility.
- Added detailed error messages showing closest match location and similarity percentage to aid debugging.
- Updated edit tool schema to expose fuzzy parameter for user control over matching behavior.
2026-01-02 21:07:11 +01:00
can1357 2be354322d chore: renamed package scope to @oh-my-pi for consistent branding
- Renamed npm package scope from @mariozechner to @oh-my-pi across all packages for consistent branding.
- Removed packages/pods directory and all related pod management functionality.
- Updated import paths and module declarations throughout codebase to reflect new package names.
- Reformatted code with consistent trailing comma removal and ternary operator alignment.
2026-01-02 18:08:23 +01:00
can1357 560c9670a8 feat: added MCP support and plugin system for external tool integration
- Added MCP (Model Context Protocol) support with stdio and HTTP transports for external tool integration.
- Implemented plugin system with install, enable, configure, and doctor commands for extensibility.
- Added 22 Exa MCP tools for web search, LinkedIn, company research, and websets operations.
- Introduced LSP tool with rust-analyzer support for code intelligence (diagnostics, hover, references, code actions).
- Added task tool for delegating work to specialized subagents with parallel execution support.
- Implemented web_search and web_fetch tools with Anthropic and Perplexity provider support.
2026-01-02 17:54:42 +01:00
can1357 36467c2a57 feat(coding-agent): added git context to system prompt for repo awareness
- Added git context loading to system prompt to provide AI with repository state awareness.
- Implemented automatic detection of main/master branch to support varied repository conventions.
- Included current branch, git status, and recent commits snapshot for contextual understanding.
2026-01-02 15:12:32 +01:00
can1357 47c6849a5a feat(tui): added emergency terminal restore to prevent corrupted state on crashes
- Added emergency terminal restore function to reset terminal state on crashes without requiring instance access.
- Implemented crash handlers for SIGTERM, SIGHUP, uncaught exceptions, and unhandled rejections to ensure clean terminal exit.
- Added active terminal tracking to enable blind restore when no instance is available.
2026-01-02 15:10:14 +01:00
can1357 cf5c4286f1 feat(tui): overhauled UI with welcome screen and powerline footer
- Implemented a new welcome screen component for startup.
- Introduced a powerline-style footer with integrated git status, model info, and token usage.
- Consolidated extension loading messages into a new `/status` command.
- Added `?` hotkey to display shortcuts when the editor is empty.
2026-01-02 15:05:36 +01:00
can1357 b85d3f6aa4 merge(pi/main): integrate upstream changes through v0.31.1
Merged 53 commits from pi/main including:
- Export HTML rewrite with tree sidebar and /share command
- Hooks API enhancements (custom status, editor, session management)
- Edit diff preview before tool execution
- TUI fixes (Unicode format chars, OSC 8 hyperlinks, emoji optimization)
- Gemini CLI rate limit retry with server-provided delay
- Various bug fixes and documentation updates

Resolved conflicts by preserving Bun migration (spawn→Bun.spawn,
fs→Bun.file) while accepting upstream's new features and APIs.
2026-01-02 14:34:27 +01:00
can1357 1cee37cf92 build: migrated from Node.js to Bun for native TypeScript support
- Migrated from Node.js to Bun runtime to leverage native TypeScript execution and faster startup times.
- Replaced npm with bun package manager and updated lockfile format.
- Converted Node.js APIs (child_process, fs, readline) to Bun equivalents across all packages.
- Updated shebang lines from node/tsx to bun for CLI entry points.
- Removed TypeScript build step by using source files directly as package entry points.
- Updated CI workflows to use Bun instead of Node.js for installation and testing.
2026-01-02 13:46:05 +01:00
Mario Zechner 0298084a97 Add [Unreleased] section for next cycle 2026-01-02 10:39:42 +01:00
Mario Zechner e32667781b Release v0.31.1 2026-01-02 10:39:08 +01:00
Mario Zechner 7396b1e3c4 fix: export type guard functions at runtime, fixes #397 2026-01-02 10:37:28 +01:00
Armin Ronacher 5c8f7344d4 Fix arrow key in model selector prior to model loading (#398) 2026-01-02 10:31:48 +01:00
Mario Zechner d572cd2886 Add [Unreleased] section for next cycle 2026-01-02 02:00:36 +01:00
Mario Zechner d301eabe13 Release v0.31.0 2026-01-02 01:59:59 +01:00
Mario Zechner 3eb55518eb Fix edit tool failing on files with UTF-8 BOM
Strip BOM before matching (LLM won't include invisible BOM in oldText),
restore on write.

Based on #394 by @prathamdby
2026-01-02 01:57:24 +01:00
Mario Zechner cc397427b9 Update docs for ctx.ui.editor() and handoff example
- Added ctx.ui.editor() to hooks.md and custom-tools.md
- Added ctx.ui.editor() to CHANGELOG.md
- Added handoff.ts to examples/hooks/README.md
2026-01-02 01:26:21 +01:00
Mario Zechner b3c416d556 Fix BorderedLoader to pass theme to DynamicBorder
BorderedLoader receives theme as a parameter but was creating
DynamicBorder() without passing it, causing DynamicBorder to
fall back to the global theme variable which is undefined when
loaded via jiti (separate module cache).

Added doc comment to DynamicBorder explaining the jiti issue.
2026-01-02 01:21:07 +01:00
Mario Zechner bb5070171b Fix DynamicBorder crash when theme not initialized
Make DynamicBorder defensive against undefined theme by checking
at render time instead of relying on default parameter closure.
2026-01-02 01:15:45 +01:00
Mario Zechner d8b94822c8 fix(coding-agent): prevent full re-renders during write tool streaming
Move line count from header to footer to avoid changing the first line
during streaming, which was triggering full screen re-renders in the
TUI's differential rendering logic.
2026-01-02 01:11:06 +01:00
Mario Zechner fbada4e653 Use serializeConversation in handoff hook
Properly handles all message types including tool calls, thinking,
and tool results instead of manual text extraction.
2026-01-02 00:45:03 +01:00