Skip to content

feat: 效果图生成落屏(screenFromEffectImageWorkflow) - #8

Merged
Onweekendd merged 17 commits into
mainfrom
feat/screen-from-effect-image
Oct 25, 2026
Merged

Onweekendd merged 17 commits into
mainfrom
feat/screen-from-effect-image

Conversation

@Onweekendd

Copy link
Copy Markdown
Owner

Summary

  • 新增生图模型角色(AiModel.role = "image")与 GeneratedImage 表,支持配置任意 OpenAI 兼容的 images.generations 端点,promptHash 幂等避免重复生图
  • 新增 screenFromEffectImageWorkflow:用户先看效果图挑定一张,再走 vision 划区 → 生成整屏底图/卡片框 → 按图表形态建组件+mock 数据 → 逐个推进画布;配套 create_image 工具、效果图分析 agent,并接入 sw-agent 与 mastra 入口
  • 顺带修复 requirement-to-bi 装配阶段 zIndex 全为 0 导致组件互相遮挡的问题
  • 前端:createImageTool 结果直接在对话里预览出图;edit_files 执行期间画布上对目标组件叠加扫光提示

Test plan

  • pnpm --filter server test 覆盖 model-registry / ai-model.server / image-generation.server / screen-from-effect-image 相关用例
  • pnpm --filter server smoke:effect-image 手动跑一次生图链路(需配置 IMAGE_MODEL_* env)
  • 前端设置页确认新增「生图模型」角色可保存/测试连通性
  • 对话里触发一次 edit_files,确认画布扫光提示正常显示与消失

🤖 Generated with Claude Code

Onweekendd and others added 17 commits September 16, 2026 20:24
Drop the legacy message-channel action types (SendUe4Msg, SendAIManMsg,
SwitchTCState), their config panels, composables and type/schema
definitions, along with the unused controlEncodes editor.
…er/row schema

Replace the flat seriesX/seriesY option arrays of swScroll with nested
columns/header/rowStyle/rowIndex/scroll config, simplify the renderer and
editor panels accordingly, and update schema docs, module seed data and
the preview image.
Introduce seriesAlignmentSuperRefine for chart data/option series matching
and a per-component componentSuperRefineMap (starting with swFlopPerformance
toggle/value linkage), applied only on the runtime validation path so
historical data does not break schema consistency tests.
AiModel 增加 "image" 角色(走 images.generations 接口),新建
GeneratedImage 表以 promptHash 做幂等键避免重复生图;前端设置页
同步补上生图角色的配置项。

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
支持"先生一张效果图、用户挑定后再落屏"的流程:vision 划区 → 生成
整屏底图与卡片框素材 → 按图表形态选组件并造 mock 数据 → 逐个推进
画布。配套新增 create_image 工具、效果图分析 agent,并接入 sw-agent
与 mastra 入口;同时修复 requirement-to-bi 装配阶段 zIndex 全为 0
导致组件互相遮挡的问题。

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
createImageTool 的结果直接在对话里出图(el-image 预览);edit_files
执行期间在画布上对目标组件叠加扫光效果,让用户能看到 agent 正在改
哪个组件,改完自动消失。

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
叶子节点没有 children,放在循环末尾判断会先空跑一次 children 遍历;
提前到循环开头判断并 continue,逻辑更清晰也避免无意义遍历。

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
按《原子组件迁移方案》:字段名与取值改用 CSS 词汇,复合属性合并为完整 CSS
字符串(textShadow/filter/transform/animation 等);新增矩形 swBox;
echartcommon 增加 echartsOption JSON 主通道,echartFormatter 降级为兜底;
新增 upgradeComponent 纯函数在读取时把旧数据自动升级到 v2,并配套单测。

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
按 CSS 语义重写文字组件渲染(渐变文字走 background-clip:text,阴影与
渐变冲突时转 filter:drop-shadow);跑马灯/超链接/普通文字改由字段是否
存在区分,不再依赖 type 枚举;下架不再需要的多层渐变图层面板与
loading 特效面板。

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
图片组件按 CSS 语义重写(九宫格用 border-image、filter/transform/
animation 均为完整 CSS 字符串),合并 swimgBorder 能力;新增矩形 swBox
组件用于蒙层/渐变块/发光边框/毛玻璃底板;新增全局预设动画关键帧样式
与 atomicCssComposers 面板双向转换工具;下架不再需要的毛玻璃面板。

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
echartcommon 支持 echartsOption JSON 主通道并兼容旧 echartFormatter;
componentEntry 类型与属性面板渲染逻辑适配 swtext/swimg/swBox 新面板
结构;补充 swtext/swimg/swBox/echartcommon 的单元测试。

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
pickForAsset/pickForText/pickForChart 改为写入 swtext/swimg v2 与
echartcommon 的 echartsOption 字段;modules 表种子数据同步更新到 v2;
配套更新工作流单测。

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@Onweekendd
Onweekendd merged commit 2c59341 into main Oct 25, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant