chore(ui): rename auto model to Agent模式
Some checks failed
Lint / build (20) (push) Has been cancelled
Playwright Tests / test (push) Has been cancelled

This commit is contained in:
Your Name 2026-02-14 01:42:27 +08:00
parent b30ebc58b9
commit d5ad5faa5f
5 changed files with 21 additions and 21 deletions

View File

@ -2842,7 +2842,7 @@ export function AdminSettingsClient() {
<div className="space-y-0.5">
<Label htmlFor="showAutoModel">显示"自动"模型选项</Label>
<div className="text-sm text-muted-foreground">
开启后,用户可以选择"智能自动"模型,系统将根据场景智能选择最佳模型
开启后,用户可以选择"Agent模式"模型,系统将根据场景智能选择最佳模型
</div>
</div>
<Switch
@ -2998,7 +2998,7 @@ export function AdminSettingsClient() {
<SelectValue placeholder="选择默认模型" />
</SelectTrigger>
<SelectContent>
<SelectItem value="auto">智能自动(推荐)</SelectItem>
<SelectItem value="auto">Agent模式(推荐)</SelectItem>
{modelsData?.models?.filter((m: any) => m.supportsImageGen).map((model: any) => (
<SelectItem key={model.id} value={model.id}>
{model.displayName}
@ -3007,13 +3007,13 @@ export function AdminSettingsClient() {
</SelectContent>
</Select>
<div className="text-xs text-muted-foreground">
设置无限画布中用户的默认生图模型。"智能自动"会根据用户需求自动选择最佳模型。
设置无限画布中用户的默认生图模型。"Agent模式"会根据用户需求自动选择最佳模型。
</div>
</div>
{/* 智能自动模式下的默认生图模型 */}
{/* Agent模式下的默认生图模型 */}
<div className="space-y-2 mt-4 pt-4 border-t">
<Label htmlFor="canvasAutoModeDefaultModelId">智能自动模式 - 默认生图模型</Label>
<Label htmlFor="canvasAutoModeDefaultModelId">Agent模式 - 默认生图模型</Label>
<Select
value={siteSettings.canvasAutoModeDefaultModelId || "system"}
onValueChange={(value) => setSiteSettings({
@ -3034,7 +3034,7 @@ export function AdminSettingsClient() {
</SelectContent>
</Select>
<div className="text-xs text-muted-foreground">
当用户选择"智能自动"模式时,系统实际使用的生图模型。"系统智能选择"会根据用户意图(如抠图、换背景等)自动路由到最佳模型。
当用户选择"Agent模式"时,系统实际使用的生图模型。"系统智能选择"会根据用户意图(如抠图、换背景等)自动路由到最佳模型。
</div>
</div>
</>

View File

@ -726,22 +726,22 @@ export function CanvasChatPanel({ chatId, initialMessages = [], onClose, onOpenF
// 过滤支持图片生成的模型
const imageModels = modelsData?.models?.filter(m => m.supportsImageGen) || [];
// 智能自动模型选项
// Agent模式(自动路由)模型选项
const SMART_AUTO_MODEL = {
id: "auto",
modelId: "auto",
displayName: "智能自动",
displayName: "Agent模式",
providerType: "auto",
supportsImageGen: true,
};
// 所有可选模型(智能自动 + 生图模型)
// 所有可选模型(Agent模式 + 生图模型)
const allModels = [SMART_AUTO_MODEL, ...imageModels];
// 默认选择模型(根据系统设置)
useEffect(() => {
if (!selectedModelId && siteSettings) {
// 使用系统设置的默认模型,如果没有设置则使用智能自动
// 使用系统设置的默认模型,如果没有设置则使用Agent模式
const defaultModel = siteSettings.canvasDefaultModelId || "auto";
setSelectedModelId(defaultModel);
}
@ -1153,7 +1153,7 @@ export function CanvasChatPanel({ chatId, initialMessages = [], onClose, onOpenF
return result;
}, [messages, nodes, selectedImageNodes]);
// 🆕 智能自动模式上下文(画布图片布局)
// 🆕 Agent模式上下文(画布图片布局)
const buildAutoContext = useCallback(() => {
const imageNodes = nodes.filter(n => n.type === 'image' && (n.data as any)?.src);
if (imageNodes.length === 0) return "";
@ -2036,7 +2036,7 @@ export function CanvasChatPanel({ chatId, initialMessages = [], onClose, onOpenF
<Paperclip className="h-4 w-4" />
</Button>
{/* Agent Selector (Model) - 包含智能自动选项 */}
{/* Agent Selector (Model) - 包含Agent模式选项 */}
<Select value={selectedModelId} onValueChange={setSelectedModelId}>
<SelectTrigger className={cn(
"h-8 text-xs transition-colors rounded-full px-3 gap-1 w-auto flex-shrink-0",
@ -2050,15 +2050,15 @@ export function CanvasChatPanel({ chatId, initialMessages = [], onClose, onOpenF
<Sparkles className="h-3 w-3" />
)}
<span className="truncate max-w-[60px]">
{allModels.find(m => m.id === selectedModelId)?.displayName || "智能自动"}
{allModels.find(m => m.id === selectedModelId)?.displayName || "Agent模式"}
</span>
</SelectTrigger>
<SelectContent>
{/* 智能自动选项 */}
{/* Agent模式选项 */}
<SelectItem value="auto" className="text-xs">
<div className="flex items-center gap-2">
<Zap className="h-3 w-3 text-purple-500" />
<span>智能自动</span>
<span>Agent模式</span>
<span className="text-[10px] text-muted-foreground">先对话再生图</span>
</div>
</SelectItem>

View File

@ -313,7 +313,7 @@ export function LovartHome({
{
id: "auto",
modelId: "auto",
displayName: "智能自动",
displayName: "Agent模式",
providerType: "auto",
supportsImageGen: true,
},
@ -1016,12 +1016,12 @@ export function LovartHome({
<Select value={selectedModelId || "auto"} onValueChange={setSelectedModelId}>
<SelectTrigger className="h-8 w-auto min-w-[110px] rounded-full border border-blue-100 bg-blue-50 px-3 text-xs text-blue-600">
<span className="truncate max-w-[100px]">
{currentComposerModel?.displayName || "智能自动"}
{currentComposerModel?.displayName || "Agent模式"}
</span>
</SelectTrigger>
<SelectContent>
<SelectItem value="auto" className="text-xs">
智能自动
Agent模式
</SelectItem>
{imageModels.map((model) => (
<SelectItem key={model.id} value={model.id} className="text-xs">

View File

@ -61,7 +61,7 @@ export function ModelSelector({
const autoModel: DynamicModel = {
id: "auto",
modelId: "auto",
displayName: "✨ 智能自动 (Auto)",
displayName: "Agent模式",
description: "AI 自动识别意图,为您选择最佳模型",
supportsVision: true,
supportsImageGen: true,

View File

@ -1043,7 +1043,7 @@ function PureModelSelectorCompact({
// 定义自动模式
const autoModel: DynamicModel = {
id: "auto",
displayName: "✨ 智能自动 (Auto)",
displayName: "Agent模式",
description: "根据您的意图自动选择最合适的模型",
supportsVision: true,
isDefault: false,
@ -1134,7 +1134,7 @@ function PureModelSelectorCompact({
// 🆕 如果选择的是"自动"模式,直接传递 "auto" 给后端
// 后端会使用智能分析器进行意图识别和模型选择
if (model.id === "auto") {
console.log("[自动模式] 选择智能自动模式,后端将进行意图分析和模型路由");
console.log("[自动模式] 选择Agent模式,后端将进行意图分析和模型路由");
setOptimisticModelId("auto");
onModelChange?.("auto");
startTransition(() => {