mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-16 03:01:56 +00:00
fix(sdk): extensions: [] now disables discovery as documented (#465)
This commit is contained in:
parent
6a8609ac56
commit
042d3fa310
3 changed files with 14 additions and 6 deletions
|
|
@ -444,6 +444,14 @@ export async function createAgentSession(options: CreateAgentSessionOptions = {}
|
|||
errors: [],
|
||||
setUIContext: () => {},
|
||||
};
|
||||
} else if (options.extensions !== undefined) {
|
||||
// User explicitly provided extensions array (even if empty) - skip discovery
|
||||
// Inline factories from options.extensions are loaded below
|
||||
extensionsResult = {
|
||||
extensions: [],
|
||||
errors: [],
|
||||
setUIContext: () => {},
|
||||
};
|
||||
} else {
|
||||
// Discover extensions, merging with additional paths
|
||||
const configuredPaths = [...settingsManager.getExtensionPaths(), ...(options.additionalExtensionPaths ?? [])];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue