refactor(canvas): 重构画布助手面板组件结构
- 移除 Segmented 组件并替换为自定义模式切换按钮 - 替换 ModelPicker 为 ComposerModelPill 组件 - 添加下拉菜单实现模型选择功能 - 优化 CSS 样式类和响应式布局 - 更新图标引入和工具栏组件结构 - 简化提示词库按钮样式配置
This commit is contained in:
@@ -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>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user