Commit Graph

170 Commits

Author SHA1 Message Date
Mario Zechner 1f68d6eb40 Release v0.7.22 2025-11-19 01:50:45 +01:00
Mario Zechner 1b28780155 Release v0.7.21 2025-11-19 00:56:16 +01:00
Mario Zechner 5112fc6ba9 Release v0.7.20 2025-11-18 22:52:49 +01:00
Mario Zechner 38ac29acfb Add ANSI-aware word wrapping to TUI components
- Created shared wrapTextWithAnsi() function in utils.ts
- Handles word-based wrapping while preserving ANSI escape codes
- Properly tracks active ANSI codes across wrapped lines
- Supports multi-byte characters (emoji, surrogate pairs)
- Updated Markdown and Text components to use shared wrapping
- Removed duplicate wrapping logic (158 lines total)
2025-11-18 22:26:24 +01:00
Mario Zechner 22d8a0ae4a Release v0.7.18 2025-11-18 22:08:44 +01:00
Mario Zechner a11c1aa4ff Release v0.7.17 2025-11-18 17:49:12 +01:00
Mario Zechner 587d7c39a4 feat(coding-agent): add OAuth authentication for Claude Pro/Max
- Add /login and /logout commands for OAuth flow
- OAuth tokens stored in ~/.pi/agent/oauth.json with 0600 permissions
- Auto-refresh tokens when expired (5min buffer)
- Priority: OAuth > ANTHROPIC_OAUTH_TOKEN env > ANTHROPIC_API_KEY env
- Fix model selector async loading and re-render
- Add bracketed paste support to Input component for long codes
- Update README.md with OAuth documentation
- Add implementation docs and testing checklist
2025-11-18 17:33:33 +01:00
Mario Zechner 387cc97bac Fix Anthropic API rejection when resubmitting aborted thinking blocks
- Convert thinking blocks with missing/empty signatures to text blocks
- Prevents 400 error: 'Invalid signature in thinking block'
- Occurs when stream is aborted mid-thinking and message is resubmitted
2025-11-18 14:36:57 +01:00
Mario Zechner 6680034a64 Release v0.7.16 2025-11-17 14:12:04 +01:00
Mario Zechner f2b3953711 v0.7.15: Anthropic OAuth support 2025-11-17 12:53:57 +01:00
Mario Zechner 063b7e0f11 chore: bump coding-agent to 0.7.14 - fix Anthropic OAuth and Mistral API compatibility 2025-11-17 12:46:59 +01:00
Mario Zechner a5ed6ab641 v0.7.13: Unicode input support for TUI editor 2025-11-16 23:08:10 +01:00
Mario Zechner 0c5cbd0068 v0.7.12: Custom models/providers support via models.json
- Add ~/.pi/agent/models.json config for custom providers (Ollama, vLLM, etc.)
- Support all 4 API types (openai-completions, openai-responses, anthropic-messages, google-generative-ai)
- Live reload models.json on /model selector open
- Smart model defaults per provider (claude-sonnet-4-5, gpt-5.1-codex, etc.)
- Graceful session fallback when saved model missing or no API key
- Validation errors show precise file/field info in CLI and TUI
- Agent knows its own README.md path for self-documentation
- Added gpt-5.1-codex (400k context, 128k output, reasoning)

Fixes #21
2025-11-16 22:56:24 +01:00
Mario Zechner e0c2745989 Add gpt-5.1-codex to model list 2025-11-16 22:35:09 +01:00
Mario Zechner 9b08f92dd9 Filter model selector by API keys and add user-facing documentation
- Model selector now only shows models with configured API keys
- Added yellow hint in model selector UI explaining the filtering
- Updated README.md to document the filtering behavior in both API Keys and /model sections
- Bumped version to 0.7.11
2025-11-16 21:01:31 +01:00
Mario Zechner 901449b38a Pin pdfjs-dist to exact version 5.4.394 to fix worker version mismatch 2025-11-16 00:03:58 +01:00
Mario Zechner b9c2f0a492 Release 0.7.10 2025-11-14 23:55:56 +01:00
Mario Zechner 8ae236f956 Add /branch command for conversation branching (fixes #16)
- Add /branch slash command to create conversation branches
- New UserMessageSelectorComponent shows all user messages chronologically
- Selecting a message creates new session with messages before selection
- Selected message is placed in editor for modification/resubmission
- SessionManager.createBranchedSession() creates new session files
- Updated README.md and CHANGELOG.md with /branch documentation
2025-11-14 23:52:46 +01:00
Mario Zechner 85ea9f500c chore: bump version to 0.7.9 2025-11-14 23:22:20 +01:00
Mario Zechner a686f61c1d feat(tui): improve editor Ctrl/Alt word and line deletion shortcuts
- Add Ctrl+W for word deletion (stops at whitespace/punctuation)
- Add Ctrl+U for delete to start of line (merges with previous line at col 0)
- Change Ctrl+K from delete entire line to delete to end of line (merges with next line at EOL)
- Add Option+Backspace support in Ghostty (maps to Ctrl+W via ESC+DEL sequence)
- Cmd+Backspace in Ghostty works as Ctrl+U (terminal sends same control code)
- Update README and CHANGELOG with new keyboard shortcuts

Fixes #2, Fixes #3
2025-11-14 23:19:24 +01:00
Mario Zechner ced5fc3394 Bump version to 0.7.8 2025-11-13 23:49:04 +01:00
Mario Zechner bc670bc63c Fix lockstep versioning and improve documentation
- Sync all packages to version 0.7.7
- Rewrite sync-versions.js to handle ALL inter-package dependencies automatically
- Fix web-ui dependency on pi-ai (was 0.6.0, now 0.7.7)
- Move agent fix changelog entry to coding-agent CHANGELOG
- Remove redundant agent CHANGELOG.md
- Improve README.md with clearer lockstep versioning docs
- Add /changelog command to display full changelog in TUI (newest last)
- Fix changelog description (not a scrollable viewer, just displays in chat)
- Update CHANGELOG for 0.7.7 release
2025-11-13 23:37:43 +01:00
Mario Zechner fede1303b1 Fix AGENTS.md support, changelog viewer, and session model storage
- BREAKING: Renamed AGENT.md to AGENTS.md for project context files
- Added automatic changelog viewer on startup for new sessions
- Added settings manager to track last shown changelog version
- BREAKING: Store provider and modelId separately in session files (fixes #4)
- Fixed markdown list rendering when items contain inline code with cyan formatting
- Added dynamic border component for TUI
- Updated changelog with entries for #4 and #5
2025-11-13 21:56:58 +01:00
Denis Badurina 1ecf02020d regen models and openrouter auto 2025-11-13 10:20:38 +01:00
Mario Zechner c3d8eaff68 chore: bump version to 0.7.5 2025-11-13 01:31:21 +01:00
Mario Zechner c8d762833a chore: bump version to 0.7.4 2025-11-13 01:30:26 +01:00
Mario Zechner adbe47c255 chore: bump version to 0.7.3 2025-11-13 01:29:42 +01:00
Mario Zechner d2e4a34772 fix: make read tool output more concise for images 2025-11-13 01:28:39 +01:00
Mario Zechner 39e22f1294 chore: bump versions to 0.7.2 2025-11-13 01:00:22 +01:00
Mario Zechner 4019acf1f0 chore: bump versions to 0.7.1 2025-11-13 00:05:09 +01:00
Mario Zechner b1410ef903 chore: bump versions to 0.7.0 2025-11-12 23:54:57 +01:00
Mario Zechner 60cea11f37 chore: bump versions to 0.6.3 2025-11-12 23:51:08 +01:00
Mario Zechner a2dc1187dc fix: handle Windows paths in session directory generation
- Replace backslashes in addition to forward slashes
- Remove colons from Windows drive letters (C:, D:, etc)
- Fixes ENOENT error on Windows when creating session directories
2025-11-12 23:50:30 +01:00
Mario Zechner 43a1c1ae44 chore: sync all versions to 0.6.2 and fix workspace references 2025-11-12 23:44:05 +01:00
Mario Zechner 88c65a7007 chore: bump versions to 0.6.1/0.6.2 2025-11-12 23:40:42 +01:00
Mario Zechner e533aebacd Fix Lit dependency duplication and update mini-lit to 0.2.0
- Move lit from dependencies to peerDependencies in web-ui to prevent multiple Lit instances being loaded
- Update mini-lit from 0.1.8/0.1.10 to 0.2.0 in root package.json and web-ui/package.json
- Install @tailwindcss/vite in web-ui/example
- Run biome formatting fixes across codebase

This resolves HMR custom element re-registration errors caused by duplicate Lit registries.
2025-11-12 16:03:43 +01:00
Mario Zechner 09564f2940 Update coding-agent dependencies to 0.6.0 2025-11-12 14:36:59 +01:00
Mario Zechner bf1a7d8571 Add 'pi' command alias and fix getApiKey import 2025-11-12 14:31:25 +01:00
Mario Zechner 00d8286523 Handle FinishReason.NO_IMAGE and fix optional chaining
- Add NO_IMAGE to error finish reasons in Google provider
- Fix non-null assertion after optional chaining in Anthropic provider
- Migrate biome config to 2.3.5
- Ignore Tailwind CSS file from biome checks
- Bump all packages to version 0.6.0
2025-11-12 10:58:03 +01:00
Mario Zechner 84dcab219b Add image support in tool results across all providers
Tool results now use content blocks and can include both text and images.
All providers (Anthropic, Google, OpenAI Completions, OpenAI Responses)
correctly pass images from tool results to LLMs.

- Update ToolResultMessage type to use content blocks
- Add placeholder text for image-only tool results in Google/Anthropic
- OpenAI providers send tool result + follow-up user message with images
- Fix Anthropic JSON parsing for empty tool arguments
- Add comprehensive tests for image-only and text+image tool results
- Update README with tool result content blocks API
2025-11-12 10:45:56 +01:00
Mario Zechner dc1e2f928b Add /thinking command and improve TUI UX
- Add /thinking slash command with autocomplete for setting reasoning levels (off, minimal, low, medium, high)
- Fix Ctrl+C behavior: remove hardcoded exit in TUI, let focused component handle it
- Add empty lines before and after tool execution components for better visual separation
- Fix stats rendering: display stats AFTER tool executions complete (matches web-ui behavior)
- Remove "Press Ctrl+C again to exit" message, show "(esc to interrupt)" in loader instead
- Add bash tool abort signal support with immediate SIGKILL on interrupt
- Make Text and Markdown components return empty arrays when no actual text content
- Add setCustomBgRgb() method to Markdown for dynamic background colors
2025-11-11 20:28:10 +01:00
Mario Zechner 985f955ea0 Clean up TUI package and refactor component structure
- Remove old TUI implementation and components (LoadingAnimation, MarkdownComponent, TextComponent, TextEditor, WhitespaceComponent)
- Rename components-new to components with new API (Loader, Markdown, Text, Editor, Spacer)
- Move Text and Input components to separate files in src/components/
- Add render caching to Text component (similar to Markdown)
- Add proper ANSI code handling in Text component using stripVTControlCharacters
- Update coding-agent to use new TUI API (requires ProcessTerminal, uses custom Editor subclass for key handling)
- Remove old test files, keep only chat-simple.ts and virtual-terminal.ts
- Update README.md with new minimal API documentation
- Switch from tsc to tsgo for type checking
- Update package dependencies across monorepo
2025-11-11 10:32:18 +01:00
Mario Zechner 1f9a3a00cc Custom provider WIP 2025-11-10 21:47:21 +01:00
Mario Zechner cac353b3fe Limit max output tokens to 32k 2025-10-30 15:47:36 +01:00
Mario Zechner 129ec6063b Don't dedup models across providers. 2025-10-29 20:36:54 +01:00
Mario Zechner 92f8801864 Fix message editor height adjustment, requires Chrome +123 2025-10-29 16:11:05 +01:00
Mario Zechner b6b64dff86 Better proxy handling. 2025-10-28 00:21:54 +01:00
Mario Zechner ec50ede6c2 Release 0.5.48 2025-10-26 21:23:06 +01:00
Mario Zechner bc8d994a7b Fix token statistics on abort for Anthropic provider
- Add handling for message_start event to capture initial token usage
- Fix message_delta to use assignment (=) instead of addition (+=)
  since Anthropic sends cumulative token counts, not incremental
- Add comprehensive tests for all providers (Google, OpenAI Completions,
  OpenAI Responses, Anthropic)
- Document OpenAI limitation: token stats only available at stream end

Fixes issue where aborted streams had zero token counts despite
Anthropic sending input tokens in the initial message_start event.
2025-10-26 21:22:24 +01:00
Mario Zechner 23be934a9a Relesae 0.5.47 2025-10-26 00:45:52 +02:00