fix(workflow-controller): 还没写描述也能先把参考图存下来 - #923
Conversation
updateCharacterSetup 既保存描述也保存参考图,却在入口拒空描述。用户先传图再想 文案时,上传成功了、回写却被拒,图就丢了 —— 而界面上参考图那栏标的是「选填」, 报错说的是「prompt 不能为空」,两个词也对不上。 实测:新建项目传了牛的正面图,referenceMedia 落库为空,于是「用我上传的图当母版」 那个候选压根不出现。 真正必填的是提交生成那一刻,那道闸在生成按钮上(prompt 为空时按钮置灰), 这里不需要再拦一次。 Closes 1024XEngineer#907
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
| // 在这里拒空等于「上传成功了,但因为你还没写描述,图丢了」,而界面上参考图那栏 | ||
| // 标的是「选填」。真正必填的是**提交生成**那一刻,那道闸在生成按钮上(prompt 为空 | ||
| // 时按钮置灰),不需要这里再拦一次。 | ||
| const prompt = input.prompt ?? '' |
There was a problem hiding this comment.
[P1] Retain prompt validation at the generation boundary
This now persists an empty prompt, but the separate character-template node's ready-state action remains enabled and calls generateCharacterTemplate without an options.input override. That path consumes setupNode.input.prompt directly and submits it to the generation API, so a user who uploads a reference image first can click that button and start generation with an empty required description. Please keep the empty value for the upload/update operation while validating the stored prompt in generateCharacterTemplate/the submission path (or otherwise disable that second entry point when it is empty).
Codecov Report❌ Patch coverage is
@@ Coverage Diff @@
## main #923 +/- ##
==========================================
- Coverage 86.12% 86.12% -0.01%
==========================================
Files 306 306
Lines 24037 24037
Branches 3646 3647 +1
==========================================
- Hits 20703 20701 -2
Misses 2360 2360
- Partials 974 976 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 1 file with indirect coverage changes 🚀 New features to boost your workflow:
|
Closes #907
updateCharacterSetup既保存描述也保存参考图,却在入口nonEmpty(input.prompt, 'prompt')拒空描述。用户先传图再想文案时,上传成功了、回写却被拒——图就丢了,而界面上参考图那栏标的是「选填」,报错说的是「prompt 不能为空」,两个词也对不上。实测:新建项目传了角色正面图,
referenceMedia落库为[],于是 #909 加的「用我上传的图当母版」那个候选压根不出现。真正必填的是提交生成那一刻,那道闸在生成按钮上(prompt 为空时按钮置灰),这里不需要再拦一次。
前端 format / lint / typecheck / 1382 passed / build 全过。新增一条用例,变异测试红(退回拒空即失败)。