From f038406070fe3e3205468c8b1719482eb98df980 Mon Sep 17 00:00:00 2001 From: HouYunFei <1844025705@qq.com> Date: Tue, 16 Jun 2026 17:25:45 +0800 Subject: [PATCH 1/2] feat(agent): enhance model resolution logic by normalizing model options and improving generation model selection --- docs/content/docs/progress/pending-test.mdx | 5 ----- vercel.json | 6 ------ .../(user)/canvas/components/canvas-assistant-panel.tsx | 9 +++++++-- 3 files changed, 7 insertions(+), 13 deletions(-) delete mode 100644 vercel.json diff --git a/docs/content/docs/progress/pending-test.mdx b/docs/content/docs/progress/pending-test.mdx index 8ff7c39..38daa60 100644 --- a/docs/content/docs/progress/pending-test.mdx +++ b/docs/content/docs/progress/pending-test.mdx @@ -5,8 +5,3 @@ description: 当前版本已实现但仍需人工验证的变更项 # 待测试 -- 在线 `Agent` 工具卡片详情不再保存和展示完整上下文消息,只展示当前工具调用和执行结果;需要验证详情内容体积不会随对话历史膨胀。 -- 文本生成和在线 `Agent` 的 Responses API 请求已改为流式输出;需要验证生成文本、工具确认前后的对话回复会实时刷新。 -- 在线 `Agent` 自动执行工具时会显示已完成工具卡片,并且从生成配置节点触发生成时会使用配置节点的提示词;需要验证关闭工具确认后连接节点并生图时请求不再发送空 `prompt`。 -- 网站端在线 `Agent` 工具已对齐本地 Agent 的通用画布工具,支持创建节点、创建生成流程、直接触发文本/图片/视频/音频生成和 `canvas_apply_ops`;需要验证只有文本节点时也能通过 `canvas_generate_image` 创建生图流程并执行。 -- 网站端在线 `Agent` 新建生成配置节点时会继承当前页面的默认生成设置,包括生图模型、尺寸和数量;需要验证 AI 创建生图流程时使用的模型和手动添加生成配置节点一致。 diff --git a/vercel.json b/vercel.json deleted file mode 100644 index c26bbf6..0000000 --- a/vercel.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "buildCommand": "cd web && bun run build", - "installCommand": "cd web && bun install --frozen-lockfile", - "outputDirectory": "web/.next", - "framework": "nextjs" -} diff --git a/web/src/app/(user)/canvas/components/canvas-assistant-panel.tsx b/web/src/app/(user)/canvas/components/canvas-assistant-panel.tsx index f82fdd2..1485f8e 100644 --- a/web/src/app/(user)/canvas/components/canvas-assistant-panel.tsx +++ b/web/src/app/(user)/canvas/components/canvas-assistant-panel.tsx @@ -6,7 +6,7 @@ import { Bot, Copy, Cpu, History, PanelRightClose, Plus, Settings2, Trash2, X } import { Button, Modal, Segmented, Switch, Tooltip } from "antd"; import { motion } from "motion/react"; -import { modelOptionName, resolveModelChannel, selectableModelsByCapability, useConfigStore, useEffectiveConfig, type AiConfig } from "@/stores/use-config-store"; +import { modelOptionName, normalizeModelOptionValue, resolveModelChannel, selectableModelsByCapability, useConfigStore, useEffectiveConfig, type AiConfig } from "@/stores/use-config-store"; import { canvasThemes } from "@/lib/canvas-theme"; import { nanoid } from "nanoid"; import { requestToolResponse, type ResponseFunctionTool, type ResponseInputMessage, type ResponseToolCall } from "@/services/api/image"; @@ -1021,7 +1021,7 @@ function configNodeOp(id: string, input: Record, x: number, y: composerContent: prompt, prompt, status: "idle", - model: stringOptional(input.model) || defaultGenerationModel(config, mode), + model: resolveGenerationModel(config, mode, stringOptional(input.model)), size: stringOptional(input.size) || config.size, quality: stringOptional(input.quality) || config.quality, count: numberOptional(input.count) ?? generationCount(mode === "image" ? config.canvasImageCount || config.count : config.count), @@ -1199,6 +1199,11 @@ function defaultGenerationModel(config: AiConfig, mode: "text" | "image" | "vide return config.textModel || config.model; } +function resolveGenerationModel(config: AiConfig, mode: "text" | "image" | "video" | "audio", model?: string) { + const normalized = normalizeModelOptionValue(model, config.channels); + return normalized && selectableModelsByCapability(config, mode).includes(normalized) ? normalized : defaultGenerationModel(config, mode); +} + function generationCount(value: string) { return Math.max(1, Math.min(15, Math.floor(Math.abs(Number(value)) || 1))); } From 973d14f4c35a408019cd53797732c9dc9132022d Mon Sep 17 00:00:00 2001 From: HouYunFei <1844025705@qq.com> Date: Tue, 16 Jun 2026 17:44:13 +0800 Subject: [PATCH 2/2] feat(changelog): update to version 0.4.0 with new web-based Agent Loop mode and Vercel one-click deployment support --- CHANGELOG.md | 3 +++ VERSION | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b25a289..a0fe938 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,10 @@ ## Unreleased +## v0.4.0 - 2026-06-16 + + [新增] 新增网页版Agent Loop模式。 ++ [新增] 支持Vercel一键部署。 + [调整] 移除后端,项目定位为个人画布工具。 ## v0.3.0 - 2026-06-15 diff --git a/VERSION b/VERSION index d4dfa56..01e994d 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -v0.3.0 \ No newline at end of file +v0.4.0 \ No newline at end of file