fix: align channel runtime and settings UI

This commit is contained in:
lofyer
2026-08-09 21:54:25 +08:00
parent 66b098ae36
commit 1cc969317d
17 changed files with 288 additions and 1528 deletions
+20
View File
@@ -35,6 +35,26 @@ export function getConfiguredRuntimeTarget(
return 'model'
}
export function resolveConfiguredAgentRuntimeSelection(
settings: ResolvedRuntimeSettings,
selection: AgentRuntimeSelection
): AgentRuntimeSelection {
if (
selection.provider !== 'opencode' &&
selection.provider !== 'continue'
) {
return selection
}
const profile =
selection.provider === 'opencode'
? settings.opencodeModelProfile
: settings.continueModelProfile
return {
provider: selection.provider,
...(profile ? { profileId: profile.id } : {})
}
}
export function applyRuntimeSelection(
settings: ResolvedRuntimeSettings,
selection: AgentRuntimeSelection