Commit graph

585 commits

Author SHA1 Message Date
Mario Zechner
0faadfcd00 Fix session-manager simplification issues
- Remove unused inspector import from session-manager.ts
- Remove dead code in _persist()
- Update tests for simplified SessionHeader
- Update mom context.ts: remove unused AgentState import, fix startSession(), rename isEnabled to isPersisted
2025-12-22 02:43:38 +01:00
Mario Zechner
f7a12c478c Clean up agentDir handling and remove redundant code
- Use default params instead of resolvedAgentDir pattern in loaders
- Remove unused DiscoverAndLoadHooksOptions interface
- Remove redundant github-copilot special casing in getAvailableModels
2025-12-22 01:52:58 +01:00
Mario Zechner
1236ab8007 Add default agentDir to loadCustomModels for consistency 2025-12-22 01:44:54 +01:00
Mario Zechner
d67559a5e4 Remove unused fs import from main.ts 2025-12-22 01:42:52 +01:00
Mario Zechner
b168a6cae3 Add agentDir parameter to model config functions and OAuth storage
- loadAndMergeModels(agentDir) - loads models.json from agentDir
- getAvailableModels(agentDir) - uses agentDir for model discovery
- findModel(provider, id, agentDir) - uses agentDir for model lookup
- configureOAuthStorage(agentDir) - configures OAuth to use agentDir/oauth.json
- createAgentSession calls configureOAuthStorage with options.agentDir
- Export configureOAuthStorage from SDK
2025-12-22 01:42:27 +01:00
Mario Zechner
6d4ff74430 Add agentDir parameter to SessionManager factory methods 2025-12-22 01:31:20 +01:00
Mario Zechner
ace8ea3d5b Refactor SessionManager to use static factory methods
- Add factory methods: create(cwd), open(path), continueRecent(cwd), inMemory()
- Add static list(cwd) for session listing
- Make constructor private, pass cwd explicitly
- Update SDK to take sessionManager instead of sessionFile options
- Update main.ts to create SessionManager based on CLI flags
- Update SessionSelectorComponent to take sessions[] instead of SessionManager
- Update tests to use factory methods
2025-12-22 01:29:54 +01:00
Mario Zechner
7bf4c8ff24 Remove unnecessary section divider comments 2025-12-22 01:02:42 +01:00
Mario Zechner
6201bae805 Fix lint warnings in main.ts 2025-12-22 00:58:53 +01:00
Mario Zechner
67a5fbde15 Remove inline imports from main.ts 2025-12-22 00:58:36 +01:00
Mario Zechner
4398596d41 Refactor main.ts to use SDK createAgentSession
- Add continueSession, restoreFromSession, additionalHookPaths,
  additionalCustomToolPaths, scopedModels to CreateAgentSessionOptions
- Return CreateAgentSessionResult with session, customToolsResult,
  and modelFallbackMessage
- main.ts now focuses on CLI arg parsing and mode routing
- Reduced main.ts from ~490 to ~340 lines
2025-12-22 00:55:42 +01:00
Mario Zechner
bfc1c44791 Use SDK's discoverSlashCommands in main.ts 2025-12-22 00:48:47 +01:00
Mario Zechner
5482bf3e14 Add SDK for programmatic AgentSession usage
- Add src/core/sdk.ts with createAgentSession() factory and discovery functions
- Update loaders to accept cwd/agentDir parameters (skills, hooks, custom-tools, slash-commands, system-prompt)
- Export SDK from package index

Addresses #272
2025-12-22 00:47:16 +01:00
Mario Zechner
11e743373d Fix syntax highlighting stderr spam with malformed markdown, fixes #274 2025-12-22 00:23:01 +01:00
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
Nico Bailon
70440f7591
feat(coding-agent): add configurable skills directories (#269) 2025-12-21 20:48:40 +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
Aliou Diallo
8868d623fc
feat(coding-agent): add Ctrl+Z to suspend process (#267)
* feat(tui): add isCtrlZ key detection and resetRenderState method

* feat(coding-agent): add Ctrl+Z handler to suspend process

* docs(coding-agent): add Ctrl+Z to keyboard shortcuts documentation

* feat(tui): add force parameter to requestRender
2025-12-21 20:19:32 +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
Aliou Diallo
0f6cb1183e docs(coding-agent): document Ctrl+G external editor shortcut 2025-12-21 14:51:52 +01:00
Aliou Diallo
fe853ed869 feat(coding-agent): add Ctrl+G to open external editor 2025-12-21 12:07:05 +01:00
Luke Foster
ee9b498380 Add Gemini 3 preview models to google-gemini-cli provider
- Add gemini-3-pro-preview and gemini-3-flash-preview to Cloud Code Assist
- Handle thinkingLevel config for Gemini 3 (vs thinkingBudget for Gemini 2.x)
- Gemini 3 Pro: LOW/HIGH levels only
- Gemini 3 Flash: all four levels (MINIMAL/LOW/MEDIUM/HIGH)
2025-12-20 22:10:47 -06:00
Mario Zechner
299986f06b Release v0.25.2 2025-12-21 02:59:03 +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
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
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
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
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
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
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
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