fix(chat): remove aggregated default model option

main
sp mac bookpro 2605 2026-05-29 14:42:15 +08:00
parent d6b416f5e7
commit 4a2578121a
2 changed files with 9 additions and 17 deletions

View File

@ -97,6 +97,10 @@ export default function ChatPage() {
}
const a = await AgentAPI.detail(id);
setAgent(a);
const firstModel = parseAgentModels(a.model)[0];
if (firstModel) {
setOverrides((o) => ({ ...o, model: o.model || firstModel }));
}
};
const loadAgentList = async () => {
@ -404,15 +408,6 @@ export default function ChatPage() {
label: modelName
}));
const activeModelValue = overrides.model || '';
const defaultModelLabel = agentModel || '默认模型';
const selectedModelKey = activeModelValue || '__default__';
const modelSelectOptions = [
{
value: '__default__',
label: defaultModelLabel
},
...modelOptions
];
return (
<div className="chat-shell">
@ -650,17 +645,13 @@ export default function ChatPage() {
<div className="chat-input-toolbar">
<div className="chat-input-toolbar-left">
<Select
value={selectedModelKey}
value={activeModelValue || undefined}
className="chat-model-select"
popupMatchSelectWidth={false}
options={modelSelectOptions}
options={modelOptions}
suffixIcon={<DownOutlined className="chat-model-select-arrow" />}
onChange={(value) =>
setOverrides((o) => ({
...o,
model: value === '__default__' ? undefined : String(value)
}))
}
placeholder="选择模型"
onChange={(value) => setOverrides((o) => ({ ...o, model: String(value) }))}
/>
<Upload

View File

@ -601,6 +601,7 @@ body {
color: var(--color-text);
font-weight: 500;
font-size: 13px;
padding: 0 8px;
}
.chat-model-select .ant-select-selection-placeholder {