- 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
Previously, when using 'google-generative-ai' API with a custom baseUrl
in models.json, the baseUrl was ignored and requests always went to the
default Google endpoint.
Now the provider correctly passes model.baseUrl to the SDK's
httpOptions.baseUrl, enabling use of custom endpoints or API proxies.
Fixes#216
- Fix tool result format for Gemini 3 Flash Preview compatibility
- Use 'output' key for successful results (not 'result')
- Use 'error' key for error results (not 'isError')
- Per Google SDK documentation for FunctionResponse.response
- Improve type safety in google.ts provider
- Add ImageContent import and use proper type guards
- Replace 'as any' casts with proper typing
- Import and use Schema type for tool parameters
- Add proper typing for index deletion in error handler
- Add comprehensive test for Gemini 3 Flash tool calling
- Tests successful tool call and result handling
- Tests error tool result handling
- Verifies fix for issue #213Fixes#213
* use the correct Gemini 3 Flash Preview thinking levels
* fix a build error
* add changelog entry
* regenerate models
* make less assumptions about future models
- 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
- 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
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
Tested max 8kx8k images per provider:
- Anthropic: 100 (explicit limit, fails at 101)
- OpenAI: 100-200 (100 works, 200 times out)
- Mistral: 8 (explicit limit, fails at 9)
- xAI: 100-150 (100 works, 150 times out)
- Groq: 0 (8k exceeds 33M pixel limit)
- zAI: 400 (context window limited at 500)
- OpenRouter: 40 (context window limited at 50)
- Gemini: untested (no API key in test env)
Key finding: Anthropic's 'many images' rule does NOT cause API errors.
100 x 8kx8k images work fine. Anthropic likely auto-resizes internally.
Related to #120
Tests max image count, size, dimensions, and 8k stress test for:
- Anthropic, OpenAI, Gemini, Mistral, OpenRouter, xAI, Groq, zAI
Key finding: Anthropic's 'many images' rule (>20 images = 2000px max)
does NOT cause API errors. 100 x 8k images work fine. Anthropic likely
auto-resizes internally.
Related to #120