refactor(canvas): 重构画布助手面板组件结构

- 移除 Segmented 组件并替换为自定义模式切换按钮
- 替换 ModelPicker 为 ComposerModelPill 组件
- 添加下拉菜单实现模型选择功能
- 优化 CSS 样式类和响应式布局
- 更新图标引入和工具栏组件结构
- 简化提示词库按钮样式配置
This commit is contained in:
HouYunFei
2026-05-23 15:08:13 +08:00
parent e319481976
commit ca4e87bddf
4 changed files with 204 additions and 60 deletions
+4 -3
View File
@@ -1,6 +1,7 @@
"use client";
import { Select } from "antd";
import { Cpu } from "lucide-react";
import styles from "./model-picker.module.css";
import type { AiConfig } from "@/stores/use-config-store";
@@ -53,9 +54,9 @@ export function ModelPicker({ config, value, onChange, className, fullWidth = fa
function ModelLabel({ model }: { model: string }) {
const icon = resolveModelIcon(model);
return (
<span className="flex min-w-0 items-center gap-2">
{icon && <img src={icon} alt="" className="size-4 shrink-0" />}
<span className="truncate">{model}</span>
<span className="model-picker-label flex min-w-0 items-center gap-2">
{icon ? <img src={icon} alt="" className="size-4 shrink-0" /> : <Cpu className="size-4 shrink-0 opacity-70" />}
<span className="model-picker-label-text truncate">{model}</span>
</span>
);
}