Commit graph

487 commits

Author SHA1 Message Date
Peter Steinberger
d70edf571e
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
46ba48a35d Release v0.23.1 2025-12-17 16:43:09 +01:00
Mario Zechner
ed8ee03e22 Add available imports section to custom tools docs 2025-12-17 16:41:55 +01:00
Mario Zechner
909989066a 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
48b481eb85 Add [Unreleased] section to changelog 2025-12-17 16:14:36 +01:00
Mario Zechner
67b73d018f Release v0.23.0 2025-12-17 16:13:32 +01:00
Mario Zechner
aedce30618 Re-export Type from typebox, update examples to import from pi-coding-agent 2025-12-17 16:10:01 +01:00
Mario Zechner
0ef73ad1dc Add file-trigger hook example 2025-12-17 16:06:30 +01:00
Mario Zechner
e7097d911a 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
295f51b53f Release v0.22.5 2025-12-17 01:22:13 +01:00
Mario Zechner
c352857a43 Add [Unreleased] section to changelog 2025-12-17 00:40:15 +01:00
Mario Zechner
03b061773c 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
e1ce9c1f49 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
deee1c2952 Release v0.22.3 2025-12-16 20:06:05 +01:00
Mario Zechner
871188219b Fix editor text clearing during compaction, fixes #179 2025-12-16 15:15:37 +01:00
Mario Zechner
7ac832586f 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
8319628bc3 Add changelog entries for X-Initiator header support (#200) 2025-12-16 14:34:56 +01:00
Mario Zechner
fbda78bfb3 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
82dceb22e1 Fix RGB to 256-color mapping for non-truecolor terminals 2025-12-15 22:32:23 +01:00
Mario Zechner
fd5134f88c Release v0.22.2 2025-12-15 22:09:14 +01:00
Mario Zechner
a7e3b8625b Release v0.22.1 2025-12-15 21:53:27 +01:00
Mario Zechner
04058d5812 Release v0.22.0 2025-12-15 20:14:25 +01:00
Mario Zechner
4f5f47a861 Minor README cleanup 2025-12-15 20:10:05 +01:00
Mario Zechner
8df24b48ab Update docs and changelogs for GitHub Copilot changes 2025-12-15 20:08:06 +01:00
Mario Zechner
c5543f7586 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
16c8861842 Fix GitHub Copilot model enablement instructions (VS Code, not web) 2025-12-15 19:18:07 +01:00
Mario Zechner
b66157c649 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
ce4ba70d33 Merge branch 'main' into pr-191-github-copilot-auth 2025-12-15 18:10:15 +01:00
Mario Zechner
3de8e0757d Fix model selector fuzzy search to match provider and support multi-token queries 2025-12-15 18:05:32 +01:00
cau1k
fb648bb158
clean up 2025-12-15 00:34:38 -05:00
cau1k
ccae7a4e0e
feat: initial impl
- add GitHub Copilot model discovery (env token fallback, headers,
compat) plus fallback list and quoted provider keys in generated map
- surface Copilot provider end-to-end (KnownProvider/default, env+OAuth
token refresh/save, enterprise base URL swap, available only when
creds/env exist)
- tweak interactive OAuth UI to render instruction text and prompt
placeholders

gpt-5.2-high took about 35 minutes. It had a lot of trouble with `npm
check`  and went off on a "let's adjust every tsconfig" side quest.
Device code flow works, but the ai/scripts/generate-models.ts impl is
wrong as models from months ago are missing and only those deprecated
are accessible in the /models picker.
2025-12-14 17:18:13 -05:00
Mario Zechner
3b440bb13b Release v0.21.0 2025-12-13 23:55:31 +01:00
Mario Zechner
e4e234ecff Fix image rendering artifacts and improve show-images selector
- Image component returns correct number of lines (rows) for TUI accounting
- Empty lines rendered first, then cursor moves up and image is drawn
- This clears the space the image occupies before rendering
- Add spacer before inline images in tool output
- Create ShowImagesSelectorComponent with borders like other selectors
- Use showSelector pattern for /show-images command
2025-12-13 23:53:28 +01:00
Mario Zechner
27e68d856e Merge feature/tui-inline-images: Inline image rendering for supported terminals 2025-12-13 23:22:31 +01:00
Mario Zechner
b8a0465e30 Update docs for inline images, remove PI_NO_IMAGES env var
- Add CHANGELOG entry for inline image rendering feature
- Add /show-images to slash commands table in README
- Expand Image Support section with inline rendering info
- Add terminal.showImages to settings documentation
- Remove PI_NO_IMAGES environment variable feature
2025-12-13 23:21:18 +01:00
Mario Zechner
53794d78f2 Update existing tool components when toggling show-images setting 2025-12-13 23:15:56 +01:00
Mario Zechner
f68a933d2c Add /show-images command to toggle inline image display
- Add terminal.showImages setting to settings-manager.ts
- Add /show-images slash command (only visible if terminal supports images)
- ToolExecutionComponent checks both terminal support and user setting
- Shows text fallback when inline images are disabled
2025-12-13 23:14:46 +01:00
Mario Zechner
3140514d8e Add changelog entry for PR #181 - fix macOS screenshot filenames 2025-12-13 22:07:56 +01:00
Nico Bailon
9a7bbb2839
coding-agent: fix macOS screenshot filenames with unicode spaces (#181) 2025-12-13 22:04:01 +01:00
Nico Bailon
9e9d5c94ed add inline image rendering for terminals with graphics support 2025-12-12 19:30:50 -08:00
Mario Zechner
776fab41e0 Add coding-agent changelog entry for Gemini 3 Pro thinking levels 2025-12-13 02:11:25 +01:00
Mario Zechner
38119ffbb0 Add changelog entry for #173, document attribution format in AGENTS.md 2025-12-13 02:06:39 +01:00
Mario Zechner
aed17da044 Release v0.20.2 2025-12-13 01:11:36 +01:00
Mario Zechner
aa9dc29bce Add [Unreleased] sections to CHANGELOGs 2025-12-13 00:58:16 +01:00
Mario Zechner
59cf6c717b Release v0.20.1 2025-12-13 00:57:12 +01:00
Mario Zechner
e707ac4cd0 coding-agent, mom: add skills API export and mom skills auto-discovery
coding-agent:
- Export loadSkillsFromDir, formatSkillsForPrompt, and related types
- Refactor skills.ts to expose public API

mom:
- Add skills auto-discovery from workspace/skills and channel/skills
- Fix skill loading to use host paths (not Docker container paths)
- Update README and system prompt with SKILL.md format docs
2025-12-13 00:56:10 +01:00
Mario Zechner
439f55b0eb coding-agent: add [Unreleased] section to CHANGELOG 2025-12-12 23:25:57 +01:00
Mario Zechner
a5268d2aa7 Release v0.20.0 2025-12-12 23:25:01 +01:00
Mario Zechner
3b2b9abffc coding-agent: change Pi skills to use SKILL.md convention
Breaking change: Pi skills must now be named SKILL.md inside a directory,
matching Codex CLI format. Previously any *.md file was treated as a skill.

Migrate by renaming ~/.pi/agent/skills/foo.md to ~/.pi/agent/skills/foo/SKILL.md
2025-12-12 23:23:17 +01:00
Mario Zechner
236856aa48 Release v0.19.2 2025-12-12 23:03:01 +01:00