Merge branch 'pr-1669-fixes'

# Conflicts:
#	package-lock.json
#	packages/ai/CHANGELOG.md
#	packages/coding-agent/CHANGELOG.md
This commit is contained in:
Mario Zechner 2026-02-27 21:04:00 +01:00
commit 3dcb3c1c77
14 changed files with 828 additions and 440 deletions

View file

@ -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,