feat(coding): add core host api composition

This commit is contained in:
2026-08-23 20:00:35 +08:00
parent 98bac20639
commit 22b4a9f9c4
23 changed files with 2258 additions and 59 deletions

View File

@@ -268,6 +268,7 @@ async function fetchCurrentUserModelConfig(accessToken: string): Promise<Importe
}
async function refreshRunningRuntimeAfterProviderChange(ctx: HostApiContext): Promise<void> {
ctx.codingProducts?.conversations.markProviderStale();
if (ctx.opencodeManager.getStatus().state === 'stopped') return;
try {
@@ -398,6 +399,9 @@ export async function importCurrentUserModelConfig(
signal.throwIfAborted();
await providerService.setDefaultAccount(NIANCODE_USER_MODEL_ACCOUNT_ID);
if (!runtimeRefreshRequired || options.runtimeRefresh === 'defer') {
ctx.codingProducts?.conversations.markProviderStale();
}
signal.throwIfAborted();
if (armStoppedApplyForNextFresh) {
lease.markRefreshPending();