Commit Graph

162 Commits

Author SHA1 Message Date
can1357 7f459214c1 fix(tui): align todo list 'more' indicator with item indentation 2026-01-12 07:09:12 +01:00
can1357 e29f0017af feat(agent): add todoCompletion setting to remind agent of incomplete todos 2026-01-12 07:05:01 +01:00
can1357 700281d8a8 fix(tui): render single-file reads inline 2026-01-12 06:51:50 +01:00
can1357 741ab06ed2 feat: port upstream improvements from pi-mono (f1b64b9d..6730b4fa)
TUI:
- Add fuzzy matching module (moved from coding-agent)
- Remove Kitty protocol query timeout (fixes shift+enter delays)
- Add bracketed paste check for key release/repeat detection
- Rendering optimizations (only re-render changed lines)
- Add backslash+enter newline fallback, getExpandedText()
- Refactor input.ts to use keybindings manager

Coding-agent:
- Add /skill:name slash commands with enableSkillCommands setting
- Add cwd to SessionInfo for session list display
- Improve tree selector with custom summarization instructions
- Add dequeue (Alt+Up) to restore all queued messages at once
- Add shutdown request handling for extensions
- Component invalidate() fixes for theme changes
2026-01-12 03:18:30 +01:00
can1357 03876d0360 feat(coding-agent): added todo_write tool, persistent todo panel, grouped Read display, and refactored prompts
- Added todo_write tool for creating and managing structured task lists during coding sessions.
- Added persistent todo panel above the editor that displays task progress with Ctrl+T toggle.
- Added grouped display for consecutive Read tool calls in a compact tree view.
- Changed system prompt to use more direct, field-oriented language with emphasis on verification and assumptions.
- Changed Ctrl+Enter to insert newline when not streaming, and Ctrl+T from toggling thinking blocks to toggling todo list.
- Replaced yaml package dependency with Bun's built-in YAML parser and extracted frontmatter parsing to dedicated module.
2026-01-11 23:33:27 +01:00
can1357 8ba0498eb7 fix(coding-agent): fixed keybindings and input handling for TUI editor and Cursor provider
- Changed temporary model selector keybinding from Ctrl+Y to Alt+P to avoid conflicts.
- Fixed Alt+Enter to insert newline when not streaming instead of submitting.
- Fixed Cursor provider to avoid advertising Edit tool, using full-file Write instead.
- Added Ctrl+Enter support for inserting newlines in TUI editor using Kitty and legacy terminal formats.
- Removed duplicate Ctrl+Y handler and refactored input controller to use trimmedText variable.
2026-01-11 22:59:04 +01:00
can1357 c11b2f9058 feat(coding-agent): added grouped display and compact tree view for consecutive Read tool calls
- Added grouped display for consecutive Read tool calls, showing multiple file reads in a compact tree view.
- Changed Read tool result display to hide content by default, showing only file path and status.
- Changed expand hint text from 'Ctrl+O to expand' to 'Ctrl+O for more'.
- Added ReadToolGroupComponent class to group multiple Read tool executions together in a single display.
- Renamed getStyledStatusIcon to formatStatusIcon for consistency with other format functions.
- Refactored formatExpandHint function signature to put theme parameter first and make expanded/hasMore optional.
2026-01-11 16:23:42 +01:00
can1357 18bb7c3855 feat(coding-agent): improved bash output preview with 10-line default and full output in expanded view
- Increased default bash output preview from 5 to 10 lines when collapsed.
- Updated expanded bash output view to show full untruncated output when available.
- Added fullOutput field to BashToolDetails to preserve complete output for expanded view.
- Exported BASH_DEFAULT_PREVIEW_LINES constant for consistent preview line configuration.
2026-01-11 15:25:34 +01:00
can1357 5e9ef021bb feat: enhanced subagent config, reviewer output schema, and consolidated discovery helpers
- Added thinkingLevel field to agent frontmatter allowing subagents to override thinking level with clamping to model capabilities.
- Added structured output schema to reviewer agent ensuring consistent review output format with findings, correctness verdict, and confidence.
- Expanded system prompt with defensive reasoning guidance including assumption checks, edge case awareness, and completion reflex inhibition.
- Consolidated expandPath, parseFrontmatter, and parseAgentFields utilities into discovery/helpers module eliminating code duplication across loaders.
- Replaced silent error handling with logger.warn calls across config parsing, migrations, extension loading, and OAuth refresh failures.
2026-01-11 14:09:18 +01:00
can1357 e6d33e0a48 feat(coding-agent): converted capability loading and discovery providers to async APIs with caching fs layer
- Converted SettingsManager.create(), loadSettings(), discoverSkills(), loadSlashCommands(), buildSystemPrompt(), loadSkills(), loadProjectContextFiles(), and getShellConfig() from synchronous to asynchronous APIs.
- Changed capability provider load() method from supporting both sync and async to async-only by removing loadSync().
- Removed fs property from LoadContext interface in capability types.
- Added new fs.ts module with caching layer for filesystem operations using readFile, readDirEntries, readDir, walkUp, and cache management functions.
- Refactored all discovery providers (builtin, claude, cline, codex, cursor, gemini, github, mcp-json, ssh, vscode, windsurf) to use async file operations with Promise.all for parallel loading.
2026-01-11 04:26:43 +01:00
can1357 691b65d953 feat(coding-agent): added persistent prompt history with SQLite FTS5 storage and Ctrl+R search
- Added persistent prompt history with SQLite-backed storage using FTS5 for efficient text searching.
- Added Ctrl+R keybinding to search through prompt history in interactive mode.
- Added HistoryStorage class with singleton pattern, deduplication, and prepared statements for database operations.
- Added HistorySearchComponent with scrollable results list, keyboard navigation, and selection highlighting.
- Added setHistoryStorage() method to Editor class for saving and restoring history across sessions.
2026-01-10 18:48:17 +01:00
can1357 48a9900784 feat: added extension UI customization APIs, SDK exports, CLI flags, and fixed clipboard/resize bugs
- Added setFooter(), setHeader(), and setEditorComponent() methods to ExtensionUIContext for custom UI components.
- Exported InteractiveModeOptions type and numerous UI components for programmatic SDK usage.
- Added --no-tools flag to disable all built-in tools and --no-extensions flag to disable extension discovery.
- Changed bash tool output truncation to recalculate on terminal resize instead of using cached width.
- Fixed Wayland clipboard copy (wl-copy) no longer blocking when the process doesn't exit promptly.
- Updated model pricing and renamed nex-agi/deepseek-v3.1-nex-n1 model removing :free suffix.
2026-01-10 07:11:01 +01:00
can1357 ce84c3c6f1 feat(ai): fixed Anthropic OAuth, token refresh, thinking mode, and added betas option
- Added betas option to AnthropicOptions for passing custom Anthropic beta feature flags.
- Changed Anthropic OAuth tool naming to use 'proxy_' prefix instead of mapping to Claude Code tool names.
- Added Claude Code headers for all Anthropic requests, not just OAuth tokens.
- Fixed Anthropic OAuth code parsing to accept full redirect URLs in addition to raw authorization codes.
- Fixed Anthropic token refresh to preserve existing refresh token when server doesn't return a new one.
- Fixed thinking mode being disabled when tool_choice forces a specific tool, and auto-adjusted max_tokens when thinking budget is set.
2026-01-10 06:38:37 +01:00
can1357 100061accb chore: merged in upstream changes
- Added ExtensionRuntime shared state with async extension factory support
- Introduced pluggable tool operations (BashOperations, FileOperations, etc.) for remote execution
- Added new CLI flags: --no-tools, --no-extensions, --no-skills
- Added login dialog, countdown timer, and component barrel export
- Added blockImages and thinkingBudgets settings
- Refactored stdin handling with StdinBuffer for improved key parsing
- Updated DEVELOPMENT.md with new architecture documentation
2026-01-10 06:32:51 +01:00
can1357 020beb5616 feat(coding-agent): added calc tool, multi-credential round-robin, auth.json file locking, clickable OAuth URLs
- Added calc tool supporting basic mathematical calculations with arithmetic operators, parentheses, and hex/binary/octal literals.
- Added support for multiple API credentials per provider with round-robin distribution across sessions.
- Added file locking on auth.json to prevent concurrent write corruption.
- Added clickable OAuth login URL display in terminal with plain text fallback.
- Updated ask tool prompt to emphasize exhausting other options before asking users.
- Refactored OAuth credential storage to append new credentials instead of replacing existing ones.
2026-01-10 03:36:25 +01:00
can1357 6e7ca2fc14 feat(coding-agent): added retry logic with exponential backoff
- Added retry logic with exponential backoff and model fallback for auto-compaction failures.
- Added support for pi/<role> model aliases and automatic model inheritance for subtasks.
- Enhanced error messages with retry-after timing from rate limit headers across all providers.
- Fixed image attachments being dropped when steering messages are queued during streaming.
- Changed edit tool to merge call and result displays into single block.
- Changed model override behavior to persist in settings when explicitly set via CLI.
2026-01-10 00:43:56 +01:00
can1357 86ef2bd34b chore: bump version to 3.34.0 2026-01-09 12:17:04 +01:00
can1357 5a63120dd3 feat(ai): add @oh-my-pi/pi-ai package with tool name prefixing
- Port pi-ai from upstream with Bun-first approach (source files, no dist)
- Add cli_ prefix to tool names in OAuth mode to avoid collisions
- Improve beta header handling with proper deduplication
- Convert codex-instructions.md to Bun text embed
- Strip .js extensions from all imports
2026-01-09 12:10:03 +01:00
can1357 7740b3ad47 feat(coding-agent): added env vars, file mention validation, and model fallback logic
- Added environment variable management via settings.json with applyEnvironmentVariables() and related methods.
- Enhanced file mentions to support directories, validate boundaries, and truncate large files.
- Added fallback model candidate logic in title generator to retry on model failures.
- Fixed bash output preview to minify JSON content and skip structural-only lines.
- Added Cerebras provider support with thinking block filtering and zai-glm-4.6 model priority.
- Refactored tree rendering to use consistent theme.tree properties instead of boxSharp.
2026-01-08 14:10:01 +01:00
can1357 d11ccd2e93 feat(coding-agent): added temp model controls and auto-chdir 2026-01-08 02:51:29 +01:00
can1357 02cae69bb5 feat: added session storage abstraction and configurable bash interceptor rules
- Added in-memory session storage abstraction with SessionStorage interface and MemorySessionStorage implementation.
- Added configurable bash interceptor rules with pattern-based command interception settings.
- Added AbortSignal support to 80+ web scrapers for request cancellation.
- Changed task tool to require explicit task `id` field and single `agent` parameter at top level.
- Removed `submit_review` tool - reviewers now use `complete` tool with structured output.
- Replaced Date.now() and crypto.randomUUID() with nanoid() for unique ID generation throughout codebase.
2026-01-07 23:17:09 +01:00
can1357 5919b0df94 refactor: switched to upstream @mariozechner/pi-ai and removed unused packages
- Replaced local @oh-my-pi/pi-ai with upstream @mariozechner/pi-ai@0.37.4
- Added sessionId support to agent for provider caching (OpenAI Codex)
- Deleted packages/ai (now using upstream)
- Deleted packages/mom (unused)
- Deleted packages/web-ui (unused)
2026-01-06 22:25:24 +00:00
can1357 96d676a5e5 refactor(coding-agent): migrated tool renderers to co-located modules
- Co-located tool renderers with their respective tool implementations across 14 tool modules.
- Added render-utils module with shared formatting helpers for diagnostics, diffs, paths, and metadata.
- Removed ~800 lines of inline renderer implementations from centralized renderers.ts file.
- Added Google Vertex AI provider with 11 Gemini model configurations.
- Added OpenAI Codex provider with 13 GPT-5 model configurations.
2026-01-06 22:19:24 +00:00
can1357 6f128238f3 feat(coding-agent): added configurable sub-providers and fixed a few
- Added webSearchProvider, imageProvider, and git.enabled settings for configurable provider selection and feature toggles.
- Added offset and limit parameters to Output tool for paginated reading of large outputs.
- Added provider fallback chain for web search with WebSearchProviderError class for graceful degradation.
- Changed generate_image tool to save images to temp files instead of inline base64 to reduce context bloat.
- Changed web search default model from claude-sonnet-4-5-20250514 to claude-haiku-4-5.
- Added git command interception in bash to redirect to dedicated git tool when enabled.
2026-01-06 22:16:24 +00:00
can1357 64ade9866b feat(coding-agent): added toolLabel for readable names and fixed diff cache key
- Added toolLabel property to display human-readable tool names instead of internal identifiers.
- Included 'all' parameter in edit diff computation key to ensure correct cache invalidation.
2026-01-06 22:07:24 +00:00
can1357 3536e2aaaa feat(coding-agent): added branch summaries setting to disable prompt
Branch summary prompts when navigating away from a branch are now
controlled by a setting (disabled by default). Enable in Settings →
Config → "Branch summaries" to restore the previous prompting behavior.
2026-01-06 21:58:24 +00:00
can1357 386c4b2c8d fix(coding-agent): corrected context file preview to read from raw object
- Fixed context file preview in inspector panel to read content from raw object instead of async file reads.
- Added slash commands to extensions inspector panel for visibility and management.
- Extracted getContextFileContent helper method for type-safe content extraction.
2026-01-06 21:55:24 +00:00
can1357 15fbe228b3 feat(monorepo): merged codex providers and extensions 2026-01-05 15:37:44 +01:00
can1357 44b10b12d5 feat(coding-agent): added background execution with terminal notifications
- Added /background (or /bg) command to detach UI and continue agent execution in background.
- Added completion notification system with configurable methods (bell, osc99, osc9, auto, off).
- Added completionNotification setting and OMP_NOTIFICATIONS environment variable for notification control.
- Added terminal-notify module with protocol detection for terminal emulator notifications.
2026-01-05 15:37:44 +01:00
can1357 8b38705146 feat(coding-agent): implemented OpenAI Realtime API voice mode
- Added VoiceSupervisor and VoiceController classes for realtime voice mode using OpenAI Realtime API.
- Added echo suppression, noise floor filtering, and fallback transcript handling for voice input.
- Changed voice mode toggle from Caps Lock to Ctrl+Y with auto-send on silence behavior.
- Changed default TTS model from gpt-4o-mini-tts to tts-1.
- Added kwaipilot/kat-coder-pro model and removed deprecated OpenRouter models.
2026-01-05 15:11:28 +01:00
can1357 40586a8919 feat: added voice mode with push-to-talk for hands-free interaction
- Added voice mode with Caps Lock push-to-talk for speech-to-text and text-to-speech using OpenAI APIs.
- Added voice settings configuration for transcription model, TTS model, voice selection, and audio format.
- Added description field to task tool for user-facing progress summaries in subagent spawning.
- Added isCapsLock helper function to tui package for Kitty protocol key detection.
- Added getApiKeyForProvider() method to ModelRegistry for retrieving API keys by provider name.
2026-01-05 08:11:18 +01:00
can1357 0315cef75d refactor(coding-agent): extracted shared render-utils to eliminate duplication
- Added shared render-utils module with standardized formatting functions for truncation, bytes, tokens, duration, and tree rendering.
- Extracted resolveOmpCommand() helper to centralize cross-platform subprocess command resolution.
- Consolidated duplicate utility functions across grep, find, ls, notebook, ask, output, exa, lsp, and web search renderers.
- Updated web search tool to support 'auto' as explicit provider option for auto-detection.
2026-01-05 07:35:35 +01:00
can1357 b81869dc8d feat(coding-agent): added language-specific file icons to tool output
- Added language-specific file icons to LSP diagnostics output for improved file type recognition.
- Added language-specific file icon to edit tool header display for visual consistency.
2026-01-05 05:40:12 +01:00
can1357 e880eec447 fix(coding-agent): corrected status line end cap background and separator rendering
- Fixed status line end cap rendering to apply background colors and use correct powerline separator characters.
2026-01-05 05:20:14 +01:00
can1357 36db3ff6fc feat(tui): added hardware cursor support for native terminal blinking
- Added terminal cursor mode support to Editor component with setUseTerminalCursor() and getCursorPosition() methods.
- Added getCursorPosition() method to Component interface and Container class for cursor position aggregation.
- Added hardware cursor positioning and visibility management to TUI class with change detection.
- Enabled terminal cursor mode in HookEditorComponent and CustomEditor for proper cursor blinking.
2026-01-05 05:16:39 +01:00
can1357 21192e2056 refactor: consolidated tool execution params into details object
- Changed isError property from required to optional across ToolResultMessage and tool event interfaces.
- Added SpinnerType variants with distinct animation frames per symbol preset.
- Fixed spinner animation crash when frames array is empty by adding guard clause.
- Refactored agent-loop tool execution to consolidate toolCallId, toolName, and isError into details object.
2026-01-05 04:44:43 +01:00
can1357 7f68705afa fix(coding-agent): corrected bash spinner syntax and removed redundant metadata
- Fixed string interpolation syntax error in bash execution spinner text.
- Removed redundant line count display from file read tool output metadata.
2026-01-05 04:32:22 +01:00
can1357 d5dd582753 fix(coding-agent): used theme ellipsis in bash execution component
Replaced hardcoded "..." with theme.format.ellipsis for consistent styling.
2026-01-05 04:22:37 +01:00
can1357 e7495a9b0e feat(coding-agent): added animated spinner and language icons for tool display
- Added animated spinner for task tool progress (spinnerFrame in render options)
- Added 35+ language/file type icons to theme (lang.* symbols for Unicode/Nerd/ASCII)
- Read tool now displays file type icons and metadata inline with path
- Added getFileType helper to detect image/binary/text files by extension
2026-01-05 04:21:18 +01:00
can1357 27d56f39f8 refactor(coding-agent): simplified tool output rendering with collapsible content
- Changed read tool result display to hide content by default with expand hint, showing only metadata until expanded.
- Changed diagnostics display to group messages by file with tree structure and severity icons.
- Changed diff stats formatting to use colored +/- indicators with slash separators.
- Removed custom renderers for ls, find, and grep tools in favor of generic tool display.
- Simplified truncation warning formatting for read tool output.
2026-01-05 03:13:24 +01:00
can1357 ce4703905f feat(coding-agent): introduced structured tree layouts for tool results
- Enhanced tool result renderers to use structured tree layouts with expand hints and truncation indicators.
- Added detailed metadata fields to grep, find, ls, and output tools for richer TUI display.
- Improved web-search renderer with section-based layout including Answer, Sources, Related, and Meta sections.
- Added helper functions for tree-style list formatting, diagnostics rendering, and diff preview truncation.
2026-01-05 01:13:44 +01:00
can1357 d2b3b870e9 fix(coding-agent): corrected extension status symbols for shadowed state
- Added status.shadowed symbol key to theme system for proper shadowed extension state display.
- Fixed extension list and inspector panel to use correct disabled and shadowed status symbols.
- Changed tree.hook symbol from └ to ⎿ in UNICODE_SYMBOLS.
2026-01-05 01:08:15 +01:00
can1357 9b7596c4aa feat(coding-agent): added theme system with 30+ presets and status line editor
- Added 30+ built-in color themes and comprehensive symbol customization via theme presets and overrides.
- Added status line segment editor with presets, separators, and customizable left/right segments.
- Added Biome CLI-based linter client as alternative to LSP for diagnostics and formatting.
- Added 20MB file size limit for image files to prevent memory issues during serialization.
- Replaced hardcoded Unicode symbols throughout codebase with theme-configurable symbol system.
2026-01-05 00:57:16 +01:00
can1357 8ef2697f21 feat(coding-agent): added usage statistics API to centralize tracking
- Added getUsageStatistics() method to SessionManager for tracking token usage and costs.
- Added UsageStatistics interface and type export for session usage tracking.
- Replaced inline token/cost calculation with centralized getUsageStatistics() method in status line.
- Added Pi segment and updated model icon in status line display.
2026-01-04 19:16:54 +01:00
can1357 4811403bed feat(tui): changed cursor to thin blinking bar, updated status line icons 2026-01-04 15:48:46 +01:00
can1357 eba38cfa6e feat(coding-agent): introduced powerline status bar with git integration
- Replaced FooterComponent with new StatusLineComponent featuring powerline-style segments and Nerd Font icons.
- Added git branch detection with file watching and status tracking with 1-second TTL cache.
- Added setTopBorder() method to Editor component for custom status content in top border.
- Changed Editor component to use rounded box-drawing characters for borders.
- Renamed footer theme properties to statusLine prefix across dark and light themes.
2026-01-04 15:24:39 +01:00
can1357 47837a0fa7 feat(coding-agent): introduced LSP writethrough for unified file operations
- Added createLspWritethrough factory for unified LSP-aware file write operations with formatting and diagnostics.
- Added syncContent and notifySaved LSP client methods for in-memory content synchronization.
- Added EditMatchError class and utils module with once and untilAborted helper functions.
- Changed FileDiagnosticsResult interface: renamed diagnostics->messages, hasErrors->errored, serverName->server.
- Changed session title generation to trigger before first message instead of after agent work begins.
- Simplified edit and write tools by delegating to writethrough callback and removing manual abort handling.
2026-01-04 02:23:00 +01:00
can1357 67ad18c4af chore: bump version to 3.5.1337 2026-01-03 21:53:56 +01:00
can1357 44ccf7c1cb feat(coding-agent): replaced 3-column layout with tabbed interface
- Redesigned Extension Control Center from 3-column layout to tabbed interface with provider tabs.
- Replaced sidebar tree navigation with horizontal tab bar supporting TAB/Shift+TAB cycling.
- Added session header/footer output in text mode showing version, model, provider, and thinking level.
- Removed HolyGrailLayout and SidebarTree components in favor of TwoColumnBody with tabs.
2026-01-03 21:53:01 +01:00
can1357 b7cf5a0296 feat(coding-agent): introduced extension control dashboard with search
- Added Extension Control Center dashboard with three-column layout, fuzzy search, and keyboard navigation.
- Added extension enable/disable functionality with persistent settings via SettingsManager.
- Renamed /status command to /extensions with /status as alias.
- Removed dynamic discovery settings from settings selector in favor of new extension dashboard.
2026-01-03 21:25:29 +01:00