mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-16 14:01:06 +00:00
Merge branch 'pr-1669-fixes'
# Conflicts: # package-lock.json # packages/ai/CHANGELOG.md # packages/coding-agent/CHANGELOG.md
This commit is contained in:
commit
3dcb3c1c77
14 changed files with 828 additions and 440 deletions
|
|
@ -109,7 +109,7 @@ export function createExtensionRuntime(): ExtensionRuntime {
|
|||
throw new Error("Extension runtime not initialized. Action methods cannot be called during extension loading.");
|
||||
};
|
||||
|
||||
return {
|
||||
const runtime: ExtensionRuntime = {
|
||||
sendMessage: notInitialized,
|
||||
sendUserMessage: notInitialized,
|
||||
appendEntry: notInitialized,
|
||||
|
|
@ -125,7 +125,17 @@ export function createExtensionRuntime(): ExtensionRuntime {
|
|||
setThinkingLevel: notInitialized,
|
||||
flagValues: new Map(),
|
||||
pendingProviderRegistrations: [],
|
||||
// Pre-bind: queue registrations so bindCore() can flush them once the
|
||||
// model registry is available. bindCore() replaces both with direct calls.
|
||||
registerProvider: (name, config) => {
|
||||
runtime.pendingProviderRegistrations.push({ name, config });
|
||||
},
|
||||
unregisterProvider: (name) => {
|
||||
runtime.pendingProviderRegistrations = runtime.pendingProviderRegistrations.filter((r) => r.name !== name);
|
||||
},
|
||||
};
|
||||
|
||||
return runtime;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -246,7 +256,11 @@ function createExtensionAPI(
|
|||
},
|
||||
|
||||
registerProvider(name: string, config: ProviderConfig) {
|
||||
runtime.pendingProviderRegistrations.push({ name, config });
|
||||
runtime.registerProvider(name, config);
|
||||
},
|
||||
|
||||
unregisterProvider(name: string) {
|
||||
runtime.unregisterProvider(name);
|
||||
},
|
||||
|
||||
events: eventBus,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue