Commit graph

71 commits

Author SHA1 Message Date
Mario Zechner
fb4893d8d4 Clear scrollback buffer on full TUI re-renders 2025-11-11 20:42:40 +01:00
Mario Zechner
97e00fc45d Fix Escape key to cancel autocomplete before interrupting agent 2025-11-11 20:29:38 +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
c5083bb7cb Fix markdown streaming duplication by splitting newlines first
- Added string-width library for proper terminal column width calculation
- Fixed wrapLine() to split by newlines before wrapping (like Text component)
- Fixed Loader interval leak by stopping before container removal
- Changed loader message from 'Loading...' to 'Working...'
2025-11-11 19:27:58 +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
1caa3cc1a7 Add line count to paste markers
- Paste markers now show line count: [paste #1 +50 lines]
- Update replacement logic to handle both old and new marker formats
- Provides better visibility into paste size
2025-11-11 00:24:40 +01:00
Mario Zechner
9dab1192ad Add padding to Text component and fix padding calculation
- Add paddingX and paddingY support to Text component (default 1, 1)
- Fix padding calculation bug in both Text and Markdown
- Right padding now correctly fills to terminal width
- Remove unused Spacer import from chat-simple
2025-11-11 00:22:31 +01:00
Mario Zechner
5f19dd62c7 Fix terminal rendering and add improvements
- Enable bracketed paste mode for handling large pastes
- Fix editor duplicate line rendering bug at terminal width
- Add padding support to Markdown component (paddingX/Y)
- Add Spacer component for vertical spacing
- Update chat-simple with spacers between messages
2025-11-11 00:13:46 +01:00
Mario Zechner
97c730c874 Add minimal TUI rewrite with differential rendering
- New TUI implementation with 3-strategy differential rendering
- Synchronized output (CSI 2026) for flicker-free updates
- New components: Editor, Markdown, Loader, SelectList, Spacer
- Editor: file autocomplete, slash commands, large paste markers
- Markdown: RGB background colors, caching
- Terminal: cursor movement, visibility, clear operations
- Chat demo with color-coded messages
2025-11-10 23:55:21 +01:00
Mario Zechner
ec50ede6c2 Release 0.5.48 2025-10-26 21:23:06 +01:00
Mario Zechner
23be934a9a Relesae 0.5.47 2025-10-26 00:45:52 +02:00
Mario Zechner
ef09efaac9 Fix XLSX dependency 2025-10-22 13:09:18 +02:00
Mario Zechner
a94b19e1df Fix dependencies 2025-10-22 13:05:24 +02:00
Mario Zechner
414a4eb8fd Bump version to 0.5.44 2025-10-05 23:00:59 +02:00
Mario Zechner
99983af597 Fix lints. 2025-10-03 23:21:59 +02:00
Mario Zechner
b67c10dfb1 feat: add cross-browser extension with AI reading assistant
- Create Pi Reader browser extension for Chrome/Firefox
- Chrome uses Side Panel API, Firefox uses Sidebar Action API
- Supports both browsers with separate manifests and unified codebase
- Built with mini-lit components and Tailwind CSS v4
- Features model selection dialog with Ollama support
- Hot reload development server watches both browser builds
- Add useDefineForClassFields: false to fix LitElement reactivity
2025-10-01 04:33:56 +02:00
Mario Zechner
c1185c7b95 chore: bump version to 0.5.43 2025-09-19 01:49:46 +02:00
Mario Zechner
0f7ed33ba5 chore: bump version to 0.5.42 2025-09-19 00:14:23 +02:00
Mario Zechner
293a6e878d chore: bump version to 0.5.41 2025-09-18 11:18:02 +02:00
Mario Zechner
9c921049a6 chore: bump version to 0.5.40 2025-09-16 12:24:00 +02:00
Mario Zechner
197259c88a Fix NodeJS compat 2025-09-16 02:19:47 +02:00
Mario Zechner
365b9ec390 chore: bump version to 0.5.36 2025-09-16 01:11:28 +02:00
Mario Zechner
f5ac1ef521 chore: bump version to 0.5.35 2025-09-15 20:32:50 +02:00
Mario Zechner
34a7344a7d chore: bump version to 0.5.32 2025-09-09 15:00:32 +02:00
Mario Zechner
2bdb87dfe7 chore: bump version to 0.5.31 2025-09-07 00:09:34 +02:00
Mario Zechner
9230b83d94 chore: bump version to 0.5.30 2025-09-04 12:42:18 +02:00
Mario Zechner
7d1daac39e chore: bump version to 0.5.29 2025-09-04 05:17:48 +02:00
Mario Zechner
080bf67306 chore: bump version to 0.5.28 2025-09-03 01:26:12 +02:00
Mario Zechner
acf0f5aee2 Clean-up 2025-09-03 00:01:32 +02:00
Mario Zechner
66cefb236e Massive refactor of API
- Switch to function based API
- Anthropic SDK style async generator
- Fully typed with escape hatches for custom models
2025-09-02 23:59:36 +02:00
Mario Zechner
0ac05a0676 test(ai): Add empty message tests for all providers
- Test handling of empty content arrays
- Test handling of empty string content
- Test handling of whitespace-only content
- All providers handle these edge cases gracefully
2025-09-02 02:03:06 +02:00
Mario Zechner
0fbb0921bb feat(ai): Add gpt-5-chat-latest model to generated models
- Added hardcoded gpt-5-chat-latest model since it's not in models.dev yet
- Model has image input support and proper pricing configuration
2025-09-02 01:32:26 +02:00
Mario Zechner
f1c3d44602 chore: Bump version to 0.5.25 2025-09-02 00:20:26 +02:00
Mario Zechner
3007b7a5ac chore: Bump version to 0.5.24 2025-09-01 22:09:47 +02:00
Mario Zechner
14d93ca8c6 chore: Bump version to 0.5.23 2025-09-01 22:03:09 +02:00
Mario Zechner
8324cd4192 chore: Bump version to 0.5.22 2025-09-01 21:56:12 +02:00
Mario Zechner
3caa3af8fc chore: Bump version to 0.5.21 2025-09-01 21:46:41 +02:00
Mario Zechner
add1b76b6c chore: Bump version to 0.5.20 2025-09-01 18:44:15 +02:00
Mario Zechner
5d5cd7955b chore: Bump version to 0.5.19 2025-08-31 23:56:58 +02:00
Mario Zechner
f87ac359bb chore: Bump version to 0.5.18 2025-08-31 23:49:29 +02:00
Mario Zechner
683263ba27 chore: Bump version to 0.5.17 2025-08-31 23:09:35 +02:00
Mario Zechner
8f4e96f207 chore: Bump version to 0.5.16 2025-08-31 22:17:35 +02:00
Mario Zechner
0f2eaa70e9 chore: Bump version to 0.5.15 2025-08-31 22:11:50 +02:00
Mario Zechner
f8a81b9453 test(ai): Add image input test for Anthropic Haiku 3.5
- Added image handling test for Claude 3.5 Haiku
- Ensures vision capabilities are properly tested
2025-08-30 23:00:30 +02:00
Mario Zechner
cff766d3e2 fix(ai): Fix OpenAI Responses provider multi-turn conversation support
- Added contentSignature tracking for assistant messages
- Fixed message format in convertToResponsesFormat (output_text instead of input_text)
- Properly preserve message IDs for multi-turn conversations
- Added proper ResponseOutputMessage type satisfaction
- Updated tests to cover more providers and multi-turn scenarios
2025-08-30 22:55:29 +02:00
Mario Zechner
8b12312d72 chore: Mark AI package implementation task as complete
- Moved completed AI package implementation task to done folder
- Task successfully implemented the unified AI API (@mariozechner/pi-ai)
- Package renamed, documentation improved, and published as v0.5.12
2025-08-30 21:53:23 +02:00
Mario Zechner
889208dccd docs(ai): Fix model names in README examples
- Changed gpt-4o-mini to gpt-5-mini in examples to match actual model names
- Minor formatting fixes
2025-08-30 21:48:17 +02:00
Mario Zechner
dae40167a3 docs(ai): Improve README with model discovery and capabilities documentation
- Added note that library only includes tool-calling capable models
- Added Model Discovery section showing how to enumerate models
- Added examples for finding models with specific capabilities
- Added cache read/write costs to model capabilities display
- Clarified that models are auto-fetched from APIs at build time
2025-08-30 21:46:54 +02:00
Mario Zechner
d46a98ec10 feat(ai): Rename package to @mariozechner/pi-ai and improve documentation
- Changed package name from @mariozechner/ai to @mariozechner/pi-ai
- Fixed generate-models.ts to fetch from models.dev API instead of local file
- Completely rewrote README with practical examples:
  - Image input with base64 encoding
  - Proper tool calling with context management
  - Streaming with completion indicators
  - Abort signal usage
  - Provider-specific options (reasoning/thinking)
  - Custom model definitions for local/self-hosted LLMs
  - Environment variables explanation
- Bumped version to 0.5.9 and published
2025-08-30 21:41:22 +02:00
Mario Zechner
2c03724862 fix: Remove unused imports and add biome-ignore for false positive
- Remove unused SlashCommand import from tui-renderer.ts
- Add biome-ignore comment for previousRenderCommands which is actually used
2025-08-16 19:21:43 +02:00