feat(canvas): 优化模型选择器和画布助手设置面板

- 模型选择器添加模糊匹配和图标显示支持OpenAI、Claude、Gemini
- 模型选择器下拉滚动条改为更窄的轻量样式
- 画布助手生图设置弹层调整为紧凑图像设置面板避免裁切问题
- 画布节点设置面板打开时隐藏悬浮工具条避免遮挡
This commit is contained in:
HouYunFei
2026-05-22 22:14:30 +08:00
parent 133861590e
commit cee08cb5a8
5 changed files with 51 additions and 6 deletions
@@ -404,7 +404,7 @@ function AssistantComposer({
{mode === "image" ? (
<>
<ModelPicker config={config} value={config.imageModel || config.model} onChange={(model) => onConfigChange("imageModel", model)} onMissingConfig={onMissingConfig} />
<CanvasImageSettingsPopover config={config} onConfigChange={onConfigChange} onMissingConfig={onMissingConfig} />
<CanvasImageSettingsPopover config={config} placement="topRight" getPopupContainer={() => document.body} onConfigChange={onConfigChange} onMissingConfig={onMissingConfig} />
</>
) : (
<ModelPicker config={config} value={config.textModel || config.model} onChange={(model) => onConfigChange("textModel", model)} onMissingConfig={onMissingConfig} />
@@ -152,7 +152,7 @@ function AspectIcon({ type, width, height, color }: { type: string; width: numbe
const boxHeight = ratio >= 1 ? Math.max(12, 28 / ratio) : 28;
return (
<span className="grid h-8 w-10 place-items-center">
<span className="rounded-md border-2" style={{ width: boxWidth, height: boxHeight, borderColor: color }} />
<span className="border-2" style={{ width: boxWidth, height: boxHeight, borderColor: color }} />
</span>
);
}