mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-15 19:05:11 +00:00
refactor(coding-agent): revert preloadedExtensionsResult back to preloadedExtensions
The rename was unnecessary.
This commit is contained in:
parent
6f726a2178
commit
696e1b51d3
3 changed files with 5 additions and 9 deletions
|
|
@ -2,10 +2,6 @@
|
|||
|
||||
## [Unreleased]
|
||||
|
||||
### Added
|
||||
|
||||
- `PI_SKIP_VERSION_CHECK` environment variable to disable new version notifications at startup ([#549](https://github.com/badlogic/pi-mono/pull/549) by [@aos](https://github.com/aos))
|
||||
|
||||
### Breaking Changes
|
||||
|
||||
- `ctx.ui.custom()` factory signature changed from `(tui, theme, done)` to `(tui, theme, keybindings, done)` for consistency with other input-handling factories
|
||||
|
|
@ -14,11 +10,11 @@
|
|||
- `ExtensionRunner` constructor now requires `runtime: ExtensionRuntime` as second parameter
|
||||
- `ExtensionRunner.initialize()` signature changed from options object to `(actions, contextActions, commandContextActions?, uiContext?)`
|
||||
- `ExtensionRunner.getHasUI()` renamed to `hasUI()`
|
||||
- `CreateAgentSessionOptions.preloadedExtensions` renamed to `preloadedExtensionsResult`
|
||||
- `CreateAgentSessionResult` now returns `extensionsResult: LoadExtensionsResult` instead of `customToolsResult`
|
||||
|
||||
### Added
|
||||
|
||||
- `PI_SKIP_VERSION_CHECK` environment variable to disable new version notifications at startup ([#549](https://github.com/badlogic/pi-mono/pull/549) by [@aos](https://github.com/aos))
|
||||
- Extension UI dialogs (`ctx.ui.select()`, `ctx.ui.confirm()`, `ctx.ui.input()`) now support a `timeout` option that auto-dismisses the dialog with a live countdown display. Simpler alternative to `AbortSignal` for timed dialogs.
|
||||
- Extensions can now provide custom editor components via `ctx.ui.setEditorComponent((tui, theme, keybindings) => ...)`. Extend `CustomEditor` for full app keybinding support (escape, ctrl+d, model switching, etc.). See `examples/extensions/modal-editor.ts`, `examples/extensions/rainbow-editor.ts`, and `docs/tui.md` Pattern 7.
|
||||
- `ExtensionRuntime` interface for shared runtime state and action methods
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ export interface CreateAgentSessionOptions {
|
|||
* Pre-loaded extensions result (skips file discovery).
|
||||
* @internal Used by CLI when extensions are loaded early to parse custom flags.
|
||||
*/
|
||||
preloadedExtensionsResult?: LoadExtensionsResult;
|
||||
preloadedExtensions?: LoadExtensionsResult;
|
||||
|
||||
/** Shared event bus for tool/extension communication. Default: creates new bus. */
|
||||
eventBus?: EventBus;
|
||||
|
|
@ -438,9 +438,9 @@ export async function createAgentSession(options: CreateAgentSessionOptions = {}
|
|||
|
||||
// Load extensions (discovers from standard locations + configured paths)
|
||||
let extensionsResult: LoadExtensionsResult;
|
||||
if (options.preloadedExtensionsResult !== undefined) {
|
||||
if (options.preloadedExtensions !== undefined) {
|
||||
// Use pre-loaded extensions (from early CLI flag discovery)
|
||||
extensionsResult = options.preloadedExtensionsResult;
|
||||
extensionsResult = options.preloadedExtensions;
|
||||
} else if (options.extensions !== undefined) {
|
||||
// User explicitly provided extensions array (even if empty) - skip discovery
|
||||
// Create runtime for inline extensions
|
||||
|
|
|
|||
|
|
@ -188,7 +188,7 @@ function buildSessionOptions(
|
|||
|
||||
// Pre-loaded extensions (from early CLI flag discovery)
|
||||
if (extensionsResult && extensionsResult.extensions.length > 0) {
|
||||
options.preloadedExtensionsResult = extensionsResult;
|
||||
options.preloadedExtensions = extensionsResult;
|
||||
}
|
||||
|
||||
return options;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue