Commit Graph
100 Commits
Author SHA1 Message Date
Mario Zechner d5fd685901 Enable more biome lints and fix things 2025-12-21 22:56:20 +01:00
Mario Zechner 9c18439c4d Release v0.25.3 2025-12-21 21:01:27 +01:00
Mario Zechner d95a5c4186 feat(coding-agent): add --skills CLI flag for filtering skills
Adds glob pattern support for skill filtering:
- --skills <patterns> CLI flag (comma-separated glob patterns)
- includeSkills setting in settings.json
- ignoredSkills now supports glob patterns
- ignoredSkills takes precedence over includeSkills and --skills

Closes #268
2025-12-21 20:58:54 +01:00
Mario Zechner ace3563f0e Add tests for Gemini 3 models with thinkingLevel 2025-12-21 20:34:39 +01:00
Mario Zechner 329b3a0a36 Merge PR #264: Add Gemini 3 preview models to google-gemini-cli provider 2025-12-21 20:31:19 +01:00
Mario Zechner 6683e06376 Clarify Ctrl+Z docs to mention fg for resume 2025-12-21 20:22:29 +01:00
Mario Zechner 55ca650a40 Update README to include github-copilot, google-gemini-cli, google-antigravity providers 2025-12-21 20:17:12 +01:00
Mario Zechner 6e1bd08a9d Merge pull request #266 from aliou/feat/allow-editor-edition
feat(coding-agent): add Ctrl+G to open external editor
2025-12-21 19:29:14 +01:00
Mario Zechner 299986f06b Release v0.25.2 2025-12-21 02:59:03 +01:00
Mario Zechner d07d784ed3 docs(mom): multi-platform redesign with channel isolation
- Event-based architecture: agent forwards AgentSessionEvent to adapters
- Multi-adapter support via single config.json
- Access control: admins, DM permissions per adapter
- Channel namespacing by adapter name
- Channel isolation via bubblewrap in Linux/Docker environments
- Simplified directory structure and interfaces
2025-12-21 02:52:49 +01:00
Mario Zechner c97702cf91 Release v0.25.1 2025-12-21 02:43:47 +01:00
Mario Zechner 918750eb9e Fix tab completion for absolute paths
- Fix //tmp issue: distinguish slash commands from file paths by checking if anything precedes the /
- Fix symlinks to directories (like /tmp) not getting trailing slash
2025-12-21 02:41:38 +01:00
Mario Zechner bf51dd4126 Fix Gemini multimodal tool results causing flaky responses
For Gemini 3, images are now nested inside functionResponse.parts per the docs.
For older models, images are sent in a separate user message.

See: https://ai.google.dev/gemini-api/docs/function-calling#multimodal
2025-12-21 02:41:27 +01:00
Mario Zechner ce950ae96e Clean-up 2025-12-20 22:15:30 +01:00
Mario Zechner 62e23e2164 Add [Unreleased] section for next release cycle 2025-12-20 22:03:55 +01:00
Mario Zechner df07a74ad5 Release v0.25.0 2025-12-20 22:02:47 +01:00
Mario Zechner a81dc5eaca Add configurable OAuth storage backend and respect --models in model selector
- Add setOAuthStorage() and resetOAuthStorage() to pi-ai for custom storage backends
- Configure coding-agent to use its own configurable OAuth path via getOAuthPath()
- Model selector (/model command) now only shows models from --models scope when set
- Rewrite OAuth documentation in pi-ai README with examples

Fixes #255
2025-12-20 22:00:53 +01:00
Mario Zechner 0d13dbb2ee docs(coding-agent): add changelog entry for interruptible tool execution 2025-12-20 21:37:06 +01:00
Mario Zechner 6a319f9c3c Add OAuth providers to test suite and improve test coverage
Tests updated:
- abort.test.ts: Add Google Gemini CLI, add retries
- agent.test.ts: Add OAuth providers (Anthropic, GitHub Copilot, Gemini CLI, Antigravity), add retries, remove timeouts
- context-overflow.test.ts: Handle Cerebras 429 status code
- image-tool-result.test.ts: Add OAuth providers
- overflow.ts: Detect 429 as overflow for Cerebras

Removed obsolete debug/one-off tests:
- copilot-initiator.test.ts
- gemini-3-flash-tool-calling.test.ts
- google-thought-signature.test.ts
- mistral-debug.test.ts
- mistral-empty-assistant.test.ts
- mistral-sdk.test.ts
2025-12-20 21:34:19 +01:00
Mario Zechner fb1fdb6006 Fix orphaned tool calls by inserting synthetic empty results
When a user interrupts a tool call flow (sends a message without providing
tool results), APIs like OpenAI Responses and Anthropic fail because:
- OpenAI requires tool outputs for function calls
- OpenAI requires reasoning items to have their following items
- Anthropic requires non-empty content for error tool results

Instead of filtering out orphaned tool calls (which breaks thinking signatures),
we now insert synthetic empty tool results with isError: true and content
'No result provided'. This preserves the conversation structure and satisfies
all API requirements.
2025-12-20 21:34:19 +01:00
Mario Zechner 95fcda5887 Broader testing, more providers. 2025-12-20 21:34:19 +01:00
Mario Zechner 2a0283ecfd Fix token counts in google-gemini-cli.ts for anthropic models. 2025-12-20 21:34:18 +01:00
Mario Zechner 24f89cf070 Add out.jsonl to gitignore 2025-12-20 21:34:18 +01:00
Mario Zechner c359023c3f Add Google Gemini CLI and Antigravity OAuth providers
- Add google-gemini-cli provider: free Gemini 2.0/2.5 via Cloud Code Assist
- Add google-antigravity provider: free Gemini 3, Claude, GPT-OSS via sandbox
- Move OAuth infrastructure from coding-agent to ai package
- Fix thinking signature handling for cross-model handoff
- Fix OpenAI message ID length limit (max 64 chars)
- Add GitHub Copilot overflow pattern detection
- Add OAuth provider tests for context overflow and streaming
2025-12-20 21:34:18 +01:00
Mario Zechner 3266cac0f1 Fix coloring in footer when context usage is colored 2025-12-20 21:34:18 +01:00
Mario Zechner 14945df738 Merge pull request #261 from nicobailon/fix/mom-inline-image-attachments
fix: send Slack image attachments inline to LLM
2025-12-20 21:14:05 +01:00
Mario Zechner 1294239a7a fix(coding-agent): fix Google Cloud project discovery
Use correct API response format (cloudaicompanionProject) and proper
onboarding flow with tierId and metadata. Add retry logic for project
provisioning which may take time.
2025-12-20 10:29:09 +01:00
Mario Zechner b6fe07b618 feat(coding-agent): add Google Cloud Code Assist OAuth flow
- Add OAuth handler with PKCE flow and local callback server
- Automatic project discovery via loadCodeAssist/onboardUser endpoints
- Store credentials with projectId for API calls
- Encode token+projectId as JSON for provider to decode
- Register as 'google-cloud-code-assist' OAuth provider
2025-12-20 10:27:07 +01:00
Mario Zechner 36e17933d5 feat(ai): add Google Cloud Code Assist provider
- Add new API type 'google-cloud-code-assist' for Gemini CLI / Antigravity auth
- Extract shared Google utilities to google-shared.ts
- Implement streaming provider for Cloud Code Assist endpoint
- Add 7 models: gemini-3-pro-high/low, gemini-3-flash, claude-sonnet/opus, gpt-oss

Models use OAuth authentication and have sh cost (uses Google account quota).
OAuth flow will be implemented in coding-agent in a follow-up.
2025-12-20 10:20:30 +01:00
Mario Zechner 04dcdebbc6 docs: add changelog entry for Anthropic SDK retries 2025-12-20 09:57:03 +01:00
Mario Zechner 0fc6689dfb fix(ai): re-enable SDK retries for Anthropic provider
The SDK default of 2 retries handles transient HTTP failures quickly,
while coding-agent retries handle persistent errors with user feedback.
2025-12-20 09:56:11 +01:00
Mario Zechner c1382818cc fix(coding-agent): add connection error to retryable errors
Fixes #252
2025-12-20 09:55:03 +01:00
Mario Zechner 3f307f8786 docs: add changelog entries for #251 and #253 2025-12-20 09:52:57 +01:00
Mario Zechner b7c3cf9436 fix(coding-agent): clamp thinking level to model capabilities
- setThinkingLevel() now clamps xhigh to high when model doesn't support it
- Model changes automatically re-clamp the current thinking level
- Fixed /model command to use session.setModel() instead of agent.setModel()
- Footer and editor border color update after model/thinking changes

Closes #253
2025-12-20 09:52:57 +01:00
Mario Zechner 085294b764 Release v0.24.5 2025-12-19 22:09:35 +01:00
Mario Zechner d2276ab654 fix(tui): fix input buffering in iTerm2 causing delayed keypresses
The cell size query response parser was incorrectly holding back Kitty
keyboard protocol sequences, thinking they might be incomplete cell size
responses. This caused Ctrl+C/Ctrl+D to require multiple presses in iTerm2.

Fixed by only waiting for more data if the buffer doesn't end with a
terminal escape sequence terminator character.
2025-12-19 22:08:36 +01:00
Mario Zechner f377c3c9c3 Release v0.24.4 2025-12-19 21:54:36 +01:00
Mario Zechner 8d1229b5ec fix(coding-agent): use key helpers for arrow keys and Enter
Fixed arrow key and Enter detection in selector components to work
with Kitty protocol when Caps Lock or Num Lock is enabled.

Updated: oauth-selector, user-message-selector, hook-selector,
hook-input, model-selector, session-selector
2025-12-19 21:53:04 +01:00
Mario Zechner 65c292b7dd Fix outdated editor tests for grapheme-aware cursor movement 2025-12-19 21:41:28 +01:00
Mario Zechner ad4eb3afa6 Release v0.24.3 2025-12-19 21:36:16 +01:00
Mario Zechner ad9d68e488 Fix footer overflow on narrow terminals, add /arminsayshi easter egg 2025-12-19 21:35:09 +01:00
Mario Zechner 5095b4eb02 Release v0.24.2 2025-12-19 21:12:53 +01:00
Mario Zechner 84eaad8029 fix(tui): use isBackspace and isEnter helpers in Editor
Fixes Backspace and Enter not working with Caps Lock enabled.
The Kitty protocol sends lock key bits in modifiers which broke
the raw byte detection.
2025-12-19 21:08:24 +01:00
Mario Zechner cbd20b58a6 fix(tui): add isHome, isEnd, isDelete helpers for Kitty protocol
Extended the Kitty protocol parser to handle functional keys with
~ terminator (Delete, Insert, PageUp, PageDown) and Home/End keys.
Updated editor.ts and input.ts to use the new helpers.
2025-12-19 21:00:20 +01:00
Mario Zechner 716516d61e fix(tui): use isEnter and isBackspace helpers in Input component
Fixes Kitty protocol handling for Enter and Backspace in the Input
component, matching the Editor component fix.
2025-12-19 20:57:03 +01:00
Mario Zechner b8e46130b0 Add [Unreleased] section to changelog 2025-12-19 20:52:44 +01:00
Mario Zechner 50b055f3ae Release v0.24.1 2025-12-19 20:51:44 +01:00
Mario Zechner de1f1cc344 Export OAuth and model config functions for AgentSession scripts
Exports getAvailableModels, getApiKeyForModel, findModel, login, logout,
and getOAuthProviders from @mariozechner/pi-coding-agent so scripts using
AgentSession directly can reuse OAuth token storage and model resolution.

Fixes #245
2025-12-19 20:43:41 +01:00
Mario Zechner b8dd9be3d0 fix(tui): handle emoji deletion and cursor movement correctly
Backspace, Delete, and arrow keys now use Intl.Segmenter to operate
on grapheme clusters instead of individual UTF-16 code units. This
fixes deletion of emojis and other multi-codepoint characters.

fixes #240
2025-12-19 20:39:45 +01:00
Mario Zechner 28c3ffb914 fix(tui): handle Kitty protocol lock key modifiers
Fixes keyboard input in Ghostty on Linux when Num Lock is enabled.
The Kitty protocol includes Caps Lock (64) and Num Lock (128) bits
in modifier values. Now masks out lock bits when matching shortcuts.

Added helper functions: isArrowUp/Down/Left/Right, isEnter, isTab,
isBackspace, isShiftEnter, isAltEnter, isAltLeft/Right, isCtrlLeft/Right

fixes #243
2025-12-19 20:34:20 +01:00
Mario Zechner 7e38897673 feat: add xhigh thinking level support for gpt-5.2 models
- Add supportsXhigh() function to ai package for checking xhigh support
- Clamp xhigh to high for OpenAI models that don't support it
- Update coding-agent to use centralized supportsXhigh()
- gpt-5.2, gpt-5.2-codex now show xhigh in thinking selector

Closes #236
2025-12-19 20:07:24 +01:00
Mario Zechner b24a2ec037 Remove logo folder - now at https://github.com/badlogic/shittycodingagent.ai/blob/main/src/logo.svg 2025-12-19 19:13:48 +01:00
Mario Zechner 16685a36ec Release v0.24.0 2025-12-19 05:21:25 +01:00
Mario Zechner f92147ffe8 Release v0.23.5 2025-12-19 05:15:34 +01:00
Mario Zechner 0dbc1065ad Add Copilot-Vision-Request header for image requests
fixes #222
2025-12-19 05:12:40 +01:00
Mario Zechner 575dcb2676 Fix X-Initiator header logic for GitHub Copilot
Check last message role instead of any message in history.
This matches the original correct implementation from PR #200.

fixes #209
2025-12-19 05:08:28 +01:00
Mario Zechner 13b8af1f36 Update changelog with getMarkdownTheme export and subagent improvements 2025-12-19 04:54:02 +01:00
Mario Zechner 48e792aa52 Update custom tools README for subdirectory/index.ts structure 2025-12-19 04:54:02 +01:00
Mario Zechner a930eb8489 Convert custom tool examples to subdirectory/index.ts structure
- hello.ts → hello/index.ts
- question.ts → question/index.ts
- todo.ts → todo/index.ts
- subagent/subagent.ts → subagent/index.ts
2025-12-19 04:54:02 +01:00
Mario Zechner 320556dbf5 Subagent: markdown rendering in expanded view, chain streaming shows all steps
- Export getMarkdownTheme() from coding-agent for custom tools
- Chain/parallel modes now use Markdown component in expanded view
- Chain streaming updates include all previous steps (not just current)
- Strip {previous} placeholder from task preview in renderCall
2025-12-19 04:54:02 +01:00
Mario Zechner 4fb3af93fb Refactor subagent tool, fix custom tool discovery, fix JSON mode stdout flush
Breaking changes:
- Custom tools now require index.ts entry point in subdirectory
  (e.g., tools/mytool/index.ts instead of tools/mytool.ts)

Subagent tool improvements:
- Refactored to use Message[] from ai package instead of custom types
- Extracted agent discovery to separate agents.ts module
- Added parallel mode streaming (shows progress from all tasks)
- Added turn count to usage stats footer
- Removed redundant Query section from scout output

Fixes:
- JSON mode stdout flush: Fixed race condition where pi --mode json
  could exit before all output was written, causing consumers to
  miss final events

Also:
- Added signal/timeout support to pi.exec() for custom tools and hooks
- Renamed pi-pods bin to avoid conflict with pi
2025-12-19 04:54:02 +01:00
Mario Zechner 1151975afe Rename pi to pi-pods in README.md 2025-12-19 04:54:02 +01:00
Mario Zechner f8b6164ecd Fix Escape key handling for Kitty keyboard protocol
Add isEscape() helper that handles both raw (\x1b) and Kitty protocol
(\x1b[27u) Escape sequences. Update all components that check for
Escape key to use the new helper.
2025-12-19 04:54:02 +01:00
Mario Zechner bab5cddd4d Add changelog entry and README link for subagent example (#215) 2025-12-19 01:46:33 +01:00
Mario Zechner 774aaadbc0 Simplify getApiKey pass-through, add changelog entry for #223 2025-12-19 01:37:53 +01:00
Mario Zechner 139af12b37 Merge kitty-protocol-support into main 2025-12-19 01:21:47 +01:00
Mario Zechner b2f29613e8 Add /hotkeys command, Ctrl+D exit, markdown table borders 2025-12-19 01:19:21 +01:00
Mario Zechner b1be086169 Merge origin/main into kitty-protocol-support 2025-12-19 01:04:34 +01:00
Mario Zechner c1f2541639 Merge pull request #232 from aliou/fix/symlinked-slash-commands
fix(coding-agent): support symlinked slash commands in discovery
2025-12-19 00:57:11 +01:00
Mario Zechner e5e7b2a6a0 Improve hooks.md custom tool example with full type guard pattern 2025-12-19 00:51:21 +01:00
Mario Zechner d353e5e219 Add type guards for tool_result event narrowing
- Export isBashToolResult, isReadToolResult, etc. type guards
- Update hooks.md with type guard usage examples
- Document custom tool handling in hooks.md
2025-12-19 00:48:03 +01:00
Mario Zechner 3d9bad8fb6 Expose full tool result content and details in hook tool_result event
Breaking change: ToolResultEvent now exposes content and typed details
instead of just a result string. Hook handlers returning { result: ... }
must change to { content: [...] }.

- ToolResultEvent is now a discriminated union based on toolName
- Each built-in tool has typed details (BashToolDetails, etc.)
- Export tool details types and TruncationResult
- Update hooks.md documentation

Closes #233
2025-12-19 00:42:08 +01:00
Mario Zechner 05b7b81338 Skills standard compliance
Implement Agent Skills standard (https://agentskills.io/specification):
- Validate name (must match parent dir, lowercase, max 64 chars)
- Validate description (required, max 1024 chars)
- Warn on unknown frontmatter fields
- Warn on name collisions (keep first)
- Change prompt format to XML structure
- Remove {baseDir} placeholder (use relative paths)
- Add tests and update documentation

fixes #231
2025-12-19 00:11:39 +01:00
Mario Zechner 2f86c8bc3c Release v0.23.4 2025-12-18 16:56:50 +01:00
Mario Zechner 039b3a0845 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 5117187362 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 1a944f50f9 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 d2088f7789 Fix: handle IMAGE_RECITATION and IMAGE_OTHER FinishReason in Google provider 2025-12-18 15:47:15 +01:00
Mario Zechner 51d007d61a Add changelog entries for Google baseUrl fix (#216, #221) 2025-12-18 15:40:34 +01:00
Mario Zechner b02516a5cd Switch to more stable, oldder tsgo, switch all check scripts to tsgo 2025-12-18 15:20:41 +01:00
Mario Zechner 9c1a218f66 Add changelog entries for Gemini tool result format fix (#213, #220) 2025-12-18 15:10:54 +01:00
Mario Zechner cf448f60fb Merge branch 'main' into fix/gemini-3-flash-tool-result-format 2025-12-18 15:06:02 +01:00
Mario Zechner 21229398ad Update tsgo, switch to tsc for agent package, as tsgo hangs on Alpine in Docker x86 2025-12-18 15:02:03 +01:00
Mario Zechner 84018b0707 fix(ai): correct Gemini tool result format and improve type safety
- 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 #213

Fixes #213
2025-12-18 13:43:39 +00:00
Mario Zechner a8b58335c3 Remove coding-agent section from AGENTS.md 2025-12-18 11:51:27 +00:00
Mario Zechner 4ec2708bb3 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 82132f6c88 Add Unreleased section to CHANGELOG 2025-12-17 22:31:18 +01:00
Mario Zechner 00851369fc Release v0.23.3 2025-12-17 22:29:46 +01:00
Mario Zechner d5dde00d28 Check for compaction before prompt submission, not just after agent turn 2025-12-17 22:25:20 +01:00
Mario Zechner 3424550d21 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 5e5bdadbf9 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 5cc0126991 Include examples/ folder in binary release archives 2025-12-17 21:27:07 +01:00
Mario Zechner c18adef16e Pin Bun to 1.3.4 for cross-compile compatibility 2025-12-17 18:45:14 +01:00
Mario Zechner ee4f24fb03 Fix build-binaries workflow: use latest Bun version 2025-12-17 18:40:52 +01:00
Mario Zechner 432852c9c5 Fix build: pin Bun to 1.2.20 for cross-compilation support 2025-12-17 18:40:19 +01:00
Mario Zechner 4894fa411c 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 b5c3d77219 Add changelog entry for markdown table fix 2025-12-17 17:14:12 +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