























@@ -50,6 +50,7 @@ export function renderAgentOverview(params: {
5050 onModelFallbacksChange,
5151 onSelectPanel,
5252} = params;
53+const isDefault = Boolean(params.defaultId && agent.id === params.defaultId);
5354const config = resolveAgentConfig(configForm, agent.id);
5455const agentModel = agent.model;
5556const workspaceFromFiles =
@@ -73,14 +74,14 @@ export function renderAgentOverview(params: {
7374(defaultModel !== "-" ? normalizeModelValue(defaultModel) : null) ||
7475(configForm ? null : resolveModelPrimary(agentModel));
7576const effectivePrimary = entryPrimary ?? defaultPrimary ?? null;
77+const selectedPrimary = isDefault ? effectivePrimary : entryPrimary;
7678const modelFallbacks =
7779resolveModelFallbacks(config.entry?.model) ??
7880resolveModelFallbacks(config.defaults?.model) ??
7981(configForm ? null : resolveModelFallbacks(agentModel));
8082const fallbackChips = modelFallbacks ?? [];
8183const skillFilter = Array.isArray(config.entry?.skills) ? config.entry?.skills : null;
8284const skillCount = skillFilter?.length ?? null;
83-const isDefault = Boolean(params.defaultId && agent.id === params.defaultId);
8485const disabled = !configForm || configLoading || configSaving;
85868687const removeChip = (index: number) => {
@@ -147,19 +148,24 @@ export function renderAgentOverview(params: {
147148 <label class="field">
148149 <span>Primary model${isDefault ? " (default)" : ""}</span>
149150 <select
150- .value=${isDefault ? (effectivePrimary ?? "") : (entryPrimary ?? "")}
151+ .value=${selectedPrimary ?? ""}
151152 ?disabled=${disabled}
152153 @change=${(e: Event) =>
153154 onModelChange(agent.id, (e.target as HTMLSelectElement).value || null)}
154155 >
155156 ${isDefault
156- ? html` <option value="">Not set</option> `
157+ ? html` <option value="" ?selected=${!selectedPrimary}>Not set</option> `
157158 : html`
158- <option value="">
159+ <option value="" ?selected=${!selectedPrimary}>
159160 ${defaultPrimary ? `Inherit default (${defaultPrimary})` : "Inherit default"}
160161 </option>
161162 `}
162- ${buildModelOptions(configForm, effectivePrimary ?? undefined, params.modelCatalog)}
163+ ${buildModelOptions(
164+ configForm,
165+ effectivePrimary ?? undefined,
166+ params.modelCatalog,
167+ selectedPrimary,
168+ )}
163169 </select>
164170 </label>
165171 <div class="field">
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。