Commit Graph
1509 Commits
Author SHA1 Message Date
Aliou Diallo cdacfd6a7d fix(coding-agent): support symlinked slash commands in discovery 2025-12-18 23:57:54 +01:00
Ahmed Kamal 84272c7cc7 Add Ctrl+D to README keyboard shortcuts 2025-12-18 19:56:23 +02:00
Ahmed Kamal f9c1a14919 Add Ctrl+D to exit when editor is empty
- Add isCtrlD helper to keys.ts
- CustomEditor intercepts Ctrl+D and only triggers callback when editor is empty
- Single Ctrl+D with empty input exits immediately
- Update CHANGELOG to frame as feature (Kitty protocol support) not fix
2025-12-18 19:39:41 +02:00
Ahmed Kamal e48a1eaa18 Add helper functions for key detection and update usage
- Add isCtrlA/C/E/K/O/P/T/U/W helper functions that check both raw and Kitty formats
- Add isAltBackspace helper function
- Refactor editor.ts, input.ts, select-list.ts to use helper functions
- Refactor custom-editor.ts, session-selector.ts, user-message-selector.ts
- Add CHANGELOG entry for the Shift+Enter fix
2025-12-18 19:29:40 +02:00
Ahmed Kamal 1aa9eeff46 Add Kitty keyboard protocol support for Shift+Enter and other modifier keys
Enable the Kitty keyboard protocol on terminal start to receive enhanced
key sequences that include modifier information. This fixes Shift+Enter
not working in Ghostty, Kitty, WezTerm, and other modern terminals.

Changes:
- Enable Kitty protocol on start (\x1b[>1u), disable on stop (\x1b[<u)
- Add centralized key definitions in packages/tui/src/keys.ts
- Support both legacy and Kitty sequences for all modifier+key combos:
  - Shift+Enter, Alt+Enter for newlines
  - Shift+Tab for thinking level cycling
  - Ctrl+C, Ctrl+A, Ctrl+E, Ctrl+K, Ctrl+U, Ctrl+W, Ctrl+O, Ctrl+P, Ctrl+T
  - Alt+Backspace for word deletion
- Export Keys constants and helper functions from @mariozechner/pi-tui
2025-12-18 19:20:30 +02:00
Mario Zechner 372bed5615 Release v0.23.4 2025-12-18 16:56:50 +01:00
Mario Zechner 1edc8b6391 Merge syntax-highlighting branch: add syntax highlighting and intra-line diff
- Syntax highlighting for markdown code blocks, read/write tool output
- Intra-line diff highlighting for edit tool with word-level inverse
- VS Code-style syntax colors in themes
- Fix Google provider FinishReason handling
- Upgrade @google/genai to 1.34.0
2025-12-18 16:54:10 +01:00
Mario Zechner cb77c8f60e Add intra-line diff highlighting for edit tool
- Extract diff rendering to dedicated diff.ts component
- Show word-level changes with inverse highlighting when a single line is modified
- Use diffWords for cleaner token grouping (includes adjacent whitespace)
- Only apply intra-line diff when exactly 1 removed and 1 added line (true modification)
- Multi-line changes show all removed then all added without incorrect pairing
- Add theme.inverse() method for inverse text styling
2025-12-18 16:49:44 +01:00
Mario Zechner 03c1c5d88f Syntax highlighting improvements
- Fix cli-highlight import (use static import instead of dynamic require)
- Add syntax highlighting to read/write tool output
- Update dark/light themes with VS Code default syntax colors
- Add highlightCode and getLanguageFromPath exports
- Upgrade @google/genai to 1.34.0 for IMAGE_RECITATION/IMAGE_OTHER FinishReason
- Add AGENTS.md rule: never downgrade code to fix type errors from outdated deps
2025-12-18 16:01:01 +01:00
Mario Zechner 1970975770 Add changelog entries for Google baseUrl fix (#216, #221) 2025-12-18 15:40:34 +01:00
Mario Zechner ee700034e0 Switch to more stable, oldder tsgo, switch all check scripts to tsgo 2025-12-18 15:20:41 +01:00
Mario Zechner 7956526d73 Add changelog entries for Gemini tool result format fix (#213, #220) 2025-12-18 15:10:54 +01:00
Aliou DialloandGitHub 916d0fd68d fix(coding-agent): support symlinked tools and hooks in discovery (#219) 2025-12-18 13:07:30 +01:00
Sergii Kozak d8a28b86f1 Add syntax highlighting to markdown code blocks 2025-12-17 20:15:44 -08:00
Mario Zechner f55fbc4f52 Update coding-agent DEVELOPMENT.md to reflect current codebase
- Fix external dependency name (pi-agent-core -> pi-agent)
- Add missing files: hooks/, custom-tools/, skills.ts, github-copilot.ts
- Update components list with all 18 current components
- Add Key Abstractions sections for hooks, custom tools, skills
- Add 'Adding a New Hook Event' to development guide
- Move config.ts to correct location in directory tree
2025-12-17 22:41:17 +01:00
Mario Zechner c4129699fa Add Unreleased section to CHANGELOG 2025-12-17 22:31:18 +01:00
Mario Zechner 93542615f7 Release v0.23.3 2025-12-17 22:29:46 +01:00
Mario Zechner a3dc8b7e46 Check for compaction before prompt submission, not just after agent turn 2025-12-17 22:25:20 +01:00
Mario Zechner 05501329ff Improve documentation: README settings table, philosophy section, custom-tools intro, rpc hook_error event, hooks import aliases 2025-12-17 22:04:28 +01:00
Mario Zechner eea76250b8 Improve system prompt docs, clean up theme/skills/hooks docs, fix toolResults type
- System prompt: clearer pointers to specific doc files
- theme.md: added thinkingXhigh, bashMode tokens, fixed Theme class methods
- skills.md: rewrote with better framing, examples, and skill repositories
- hooks.md: fixed timeout/error handling docs, added custom tool interception note
- Breaking: turn_end event toolResults changed from AppMessage[] to ToolResultMessage[]
2025-12-17 21:27:28 +01:00
Mario Zechner e39479f7f8 Release v0.23.2
Fixed Claude models via GitHub Copilot re-answering all previous prompts.

fixes #209
2025-12-17 17:56:00 +01:00
Mario Zechner 206f5b1757 Add changelog entry for markdown table fix 2025-12-17 17:14:12 +01:00
916101edcf fix(coding-agent): detect image MIME via file-type (#205)
Co-authored-by: Mario Zechner <badlogicgames@gmail.com>
2025-12-17 17:11:56 +01:00
Mario Zechner 226a47821f Release v0.23.1 2025-12-17 16:43:09 +01:00
Mario Zechner cf073c23d8 Add available imports section to custom tools docs 2025-12-17 16:41:55 +01:00
Mario Zechner a63b6ab241 Fix TUI performance regression: add caching to Box, use Text directly for built-in tools 2025-12-17 16:39:23 +01:00
Mario Zechner 11c0230cbb Add [Unreleased] section to changelog 2025-12-17 16:14:36 +01:00
Mario Zechner f55d406370 Release v0.23.0 2025-12-17 16:13:32 +01:00
Mario Zechner 98685149f8 Re-export Type from typebox, update examples to import from pi-coding-agent 2025-12-17 16:10:01 +01:00
Mario Zechner e32daf0e71 Add file-trigger hook example 2025-12-17 16:06:30 +01:00
Mario Zechner 99877a8398 Custom tools with session lifecycle, examples for hooks and tools
- Custom tools: TypeScript modules that extend pi with new tools
  - Custom TUI rendering via renderCall/renderResult
  - User interaction via pi.ui (select, confirm, input, notify)
  - Session lifecycle via onSession callback for state reconstruction
  - Examples: todo.ts, question.ts, hello.ts

- Hook examples: permission-gate, git-checkpoint, protected-paths

- Session lifecycle centralized in AgentSession
  - Works across all modes (interactive, print, RPC)
  - Unified session event for hooks (replaces session_start/session_switch)

- Box component added to pi-tui

- Examples bundled in npm and binary releases

Fixes #190
2025-12-17 16:03:23 +01:00
Mario Zechner 4d9da4e4f8 Release v0.22.5 2025-12-17 01:22:13 +01:00
Mario Zechner 6af0e57db5 Add [Unreleased] section to changelog 2025-12-17 00:40:15 +01:00
Mario Zechner 7e78ef9bb2 Release v0.22.4
- Add --list-models CLI flag for listing/finding models with fuzzy search

fixes #203
2025-12-17 00:39:14 +01:00
Mario Zechner 9aca4ec0aa Fix image limits test to use realistic payload sizes
Previous test used compressed 8k images (0.01MB) which was meaningless.
Now tests with actual large noise images that don't compress.

Realistic payload limits discovered:
- Anthropic: 6 x 3MB = ~18MB total (not 32MB as documented)
- OpenAI: 2 x 15MB = ~30MB total
- Gemini: 10 x 20MB = ~200MB total (very permissive)
- Mistral: 4 x 10MB = ~40MB total
- xAI: 1 x 20MB (strict request size limit)
- Groq: 5 x 5760px images (5 image + pixel limit)
- zAI: 2 x 15MB = ~30MB (50MB request limit)
- OpenRouter: 2 x 5MB = ~10MB total

Also fixed GEMINI_API_KEY env var (was GOOGLE_API_KEY).

Related to #120
2025-12-16 23:48:59 +01:00
Mario Zechner 6388cd61ac Release v0.22.3 2025-12-16 20:06:05 +01:00
Mario Zechner 94092ec0a8 Fix editor text clearing during compaction, fixes #179 2025-12-16 15:15:37 +01:00
Mario Zechner 75aaa9b4fa Add tool result streaming
- Add AgentToolUpdateCallback type and optional onUpdate callback to AgentTool.execute()
- Add tool_execution_update event with toolCallId, toolName, args, partialResult
- Normalize tool_execution_end to always use AgentToolResult (no more string fallback)
- Bash tool streams truncated rolling buffer output during execution
- ToolExecutionComponent shows last N lines when collapsed (not first N)
- Interactive mode handles tool_execution_update events
- Update RPC docs and ai/agent READMEs

fixes #44
2025-12-16 14:53:17 +01:00
Mario Zechner be46df3f76 Add changelog entries for X-Initiator header support (#200) 2025-12-16 14:34:56 +01:00
Mario Zechner 263864cc0b Fix reasoning disabled by default for all providers
Previously, when reasoning was not specified, some providers like Gemini
with 'dynamic thinking' enabled by default would still use thinking.
Now explicitly sets thinkingEnabled: false (Anthropic) and
thinking: { enabled: false } (Google) when reasoning is undefined.

Closes #180
2025-12-15 22:42:08 +01:00
Mario Zechner de55b4a824 Fix RGB to 256-color mapping for non-truecolor terminals 2025-12-15 22:32:23 +01:00
Mario Zechner d5ebe1dc48 Release v0.22.2 2025-12-15 22:09:14 +01:00
Mario Zechner 964565c69a Release v0.22.1 2025-12-15 21:53:27 +01:00
Mario Zechner b5a2482e3c Release v0.22.0 2025-12-15 20:14:25 +01:00
Mario Zechner 696a142a91 Minor README cleanup 2025-12-15 20:10:05 +01:00
Mario Zechner 540b831716 Update docs and changelogs for GitHub Copilot changes 2025-12-15 20:08:06 +01:00
Mario Zechner f3a2dee86b GitHub Copilot: auto-enable models, fix gpt-5 API, normalize tool call IDs
- Auto-enable all models after /login via POST /models/{model}/policy
- Use openai-responses API for gpt-5/o3/o4 models (not accessible via completions)
- Normalize tool call IDs when switching between github-copilot models with different APIs
  (fixes #198: openai-responses generates 450+ char IDs with special chars that break other models)
- Update README with streamlined GitHub Copilot docs
2025-12-15 20:06:11 +01:00
Mario Zechner 6a2e3b1d88 Fix GitHub Copilot model enablement instructions (VS Code, not web) 2025-12-15 19:18:07 +01:00
Mario Zechnerandcau1k 555a736051 Add GitHub Copilot support (#191)
- OAuth login for GitHub Copilot via /login command
- Support for github.com and GitHub Enterprise
- Models sourced from models.dev (Claude, GPT, Gemini, Grok, etc.)
- Dynamic base URL from token's proxy-ep field
- Use vscode-chat integration ID for API compatibility
- Documentation for model enablement at github.com/settings/copilot/features

Co-authored-by: cau1k <cau1k@users.noreply.github.com>
2025-12-15 19:05:17 +01:00
Mario Zechner 8a47cb4e3b Merge branch 'main' into pr-191-github-copilot-auth 2025-12-15 18:10:15 +01:00