Commit Graph
610 Commits
Author SHA1 Message Date
Mario Zechner ba0b8fea83 docs: changelog entry for #287 2025-12-23 13:07:05 +01:00
scutiferandGitHub 3d86955731 feat: Call resolvePromptInput on the --system-prompt received on the CLI argument. This is needed to support file paths on the prompt (#287) 2025-12-23 13:06:40 +01:00
Mario Zechner 6ae3a2d47f Release v0.27.2 2025-12-23 03:48:52 +01:00
Aliou DialloandGitHub d3b8a702b9 docs: fix outdated custom tools paths and add missing header shortcut (#283)
* docs: fix custom tools example paths to use index.ts structure

* fix: add missing ctrl+g shortcut to startup header

* docs: fix /session -> /resume for session switching references
2025-12-23 03:29:31 +01:00
Nico BailonandGitHub 3fbad24af7 Add skipConversationRestore for before_branch hooks (#286) 2025-12-23 03:26:08 +01:00
Mario Zechner dbdcf5ed28 Release v0.27.1 2025-12-22 19:28:26 +01:00
Mario Zechner 08deb01dad Add [Unreleased] section for next cycle 2025-12-22 18:21:15 +01:00
Mario Zechner d96ed2bee6 Release v0.27.0 2025-12-22 18:20:10 +01:00
Mario Zechner cc8cbf44a6 Add before/after session events with cancellation support
- Merge branch event into session with before_branch/branch reasons
- Add before_switch, before_clear, shutdown reasons
- before_* events can be cancelled with { cancel: true }
- Update RPC commands to return cancelled status
- Add shutdown event on process exit
- New example hooks: confirm-destructive, dirty-repo-guard, auto-commit-on-exit

fixes #278
2025-12-22 18:18:38 +01:00
Mario Zechner 68c9b6a236 Add changelog entry for #280 2025-12-22 17:02:23 +01:00
Mario Zechner a35e05c5e5 Fix bash tool visual line truncation
Use visual line counting (accounting for line wrapping) instead of logical
line counting for bash tool output in collapsed mode. Now consistent with
bash-execution.ts behavior.

- Add shared truncateToVisualLines utility
- Update tool-execution.ts to use Box for bash with visual truncation
- Update bash-execution.ts to use shared utility
- Pass TUI to ToolExecutionComponent for terminal width access

Fixes #275
2025-12-22 17:01:04 +01:00
Mario Zechner b92d9a0885 Release v0.26.1 2025-12-22 16:19:19 +01:00
Mario Zechner 3c93bc882f Fix SDK tools to respect cwd option
Core tools now properly use the cwd passed to createAgentSession().
Added tool factory functions for SDK users who specify custom cwd with explicit tools.

Fixes #279
2025-12-22 16:17:55 +01:00
Mario Zechner a12318ff14 Release v0.26.0 2025-12-22 12:53:58 +01:00
Mario Zechner 594e1fd013 Add CHANGELOG entries for SDK and settings changes 2025-12-22 12:45:49 +01:00
Mario Zechner 0e7f5f6538 SDK docs: add links to specific examples in each section 2025-12-22 12:44:41 +01:00
Mario Zechner dc05041ad4 README: clarify TUI settings save to global preferences only 2025-12-22 12:40:42 +01:00
Mario Zechner 5b2a692fd5 Update README: document project-specific settings, add SettingsManager to SDK list 2025-12-22 12:34:08 +01:00
Mario Zechner 7648a69852 Fix SDK docs: AgentSession interface, findModel usage, settings example 2025-12-22 12:32:25 +01:00
Mario Zechner 9eedaad8ae Update SDK docs for SettingsManager changes 2025-12-22 12:24:58 +01:00
Mario Zechner a7aa118f64 Add project-specific settings and SettingsManager factories
- SettingsManager now loads .pi/settings.json from cwd (project settings)
- Project settings merge with global settings (deep merge for objects)
- Setters only modify global settings, project settings are read-only
- Add static factories: SettingsManager.create(cwd?, agentDir?), SettingsManager.inMemory(settings?)
- Add applyOverrides() for programmatic overrides
- Replace 'settings' option with 'settingsManager' in CreateAgentSessionOptions
- Update examples to use new pattern

Incorporates PR #276 approach
2025-12-22 12:23:02 +01:00
Mario Zechner 59976daeb8 Add SDK documentation
- docs/sdk.md: comprehensive SDK reference
  - Core concepts (createAgentSession, AgentSession, Agent, events)
  - All options with examples
  - Discovery functions
  - Complete example

- README.md: add SDK section with brief overview and links
2025-12-22 03:20:09 +01:00
Mario Zechner 7966231ed7 Add SDK usage examples
12 examples showing increasing levels of customization:
- 01-minimal: all defaults
- 02-custom-model: model and thinking level
- 03-custom-prompt: replace or modify prompt
- 04-skills: discover, filter, merge skills
- 05-tools: built-in tools, custom tools
- 06-hooks: logging, blocking, result modification
- 07-context-files: AGENTS.md files
- 08-slash-commands: file-based commands
- 09-api-keys-and-oauth: API key resolution, OAuth config
- 10-settings: compaction, retry, terminal settings
- 11-sessions: persistence options
- 12-full-control: replace everything

Also exports FileSlashCommand type from index.ts
2025-12-22 03:14:30 +01:00
Mario Zechner f4d3b65f2a Fix session persistence: flush all buffered entries on first assistant message
- SessionManager: add flushed flag, _persist() flushes all entries when first assistant seen
- SessionManager: reset() now creates session header
- MomSessionManager: same pattern, remove pendingEntries/sessionInitialized/startSession/shouldInitializeSession
2025-12-22 02:51:56 +01:00
Mario Zechner c2b4688436 Remove unused AgentState import from session-manager.ts 2025-12-22 02:43:56 +01:00
Mario Zechner a0af32ed57 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 12bbfc6a2a 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 ff0b65f626 Add default agentDir to loadCustomModels for consistency 2025-12-22 01:44:54 +01:00
Mario Zechner 932fdfad80 Remove unused fs import from main.ts 2025-12-22 01:42:52 +01:00
Mario Zechner 366923ce11 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 6fc7924eb8 Add agentDir parameter to SessionManager factory methods 2025-12-22 01:31:20 +01:00
Mario Zechner 932f8e2aa7 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 62ee4da6db Remove unnecessary section divider comments 2025-12-22 01:02:42 +01:00
Mario Zechner 38cb44576a Fix lint warnings in main.ts 2025-12-22 00:58:53 +01:00
Mario Zechner bbd8b67f34 Remove inline imports from main.ts 2025-12-22 00:58:36 +01:00
Mario Zechner 5bd9da8e1a 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 56b61226e7 Use SDK's discoverSlashCommands in main.ts 2025-12-22 00:48:47 +01:00
Mario Zechner 2a8a04d3a9 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 b483b02be8 Fix syntax highlighting stderr spam with malformed markdown, fixes #274 2025-12-22 00:23:01 +01:00
Mario Zechner f0c5be541f Enable more biome lints and fix things 2025-12-21 22:56:20 +01:00
Mario Zechner 5e961f1e22 Release v0.25.3 2025-12-21 21:01:27 +01:00
Mario Zechner 20702d2cd5 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 BailonandGitHub bf9ecc46cd feat(coding-agent): add configurable skills directories (#269) 2025-12-21 20:48:40 +01:00
Mario Zechner 55062255b8 Merge PR #264: Add Gemini 3 preview models to google-gemini-cli provider 2025-12-21 20:31:19 +01:00
Mario Zechner 7b27c08122 Clarify Ctrl+Z docs to mention fg for resume 2025-12-21 20:22:29 +01:00
Aliou DialloandGitHub dea263fe94 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 4577ed7e17 Update README to include github-copilot, google-gemini-cli, google-antigravity providers 2025-12-21 20:17:12 +01:00
Aliou Diallo 04090c8c54 docs(coding-agent): document Ctrl+G external editor shortcut 2025-12-21 14:51:52 +01:00
Aliou Diallo 1444a47c7c feat(coding-agent): add Ctrl+G to open external editor 2025-12-21 12:07:05 +01:00
Luke Foster 9471685d4f 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