feat(coding): add core host api composition
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user