From 38bae8166c56ad61f637e413b2c866e96430f9bc Mon Sep 17 00:00:00 2001 From: ila Date: Mon, 22 Jun 2026 11:26:52 +0800 Subject: [PATCH] =?UTF-8?q?docs(ai-outfit):=20spec=20resolution/model=20sw?= =?UTF-8?q?itch=20info=20popup=20(=C2=A710.2=20/=20=C2=A719.7)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit User switching the 分辨率 or AI 模型 dropdown shows an info-only QMessageBox (no block, no revert) about the impact: resolution -> per-resolution timeout + next-run-only; model -> api_type + billing/effect may differ + next-run-only. Trigger via QComboBox.activated (user-only) so programmatic sets don't pop. Add §10.2 design + §19.7 task (not yet implemented). Co-Authored-By: Claude Opus 4.8 --- docs/11-ai-outfit.md | 14 ++++++++++++++ tasks.md | 11 +++++++++++ 2 files changed, 25 insertions(+) diff --git a/docs/11-ai-outfit.md b/docs/11-ai-outfit.md index fff8e82..c7a1f75 100644 --- a/docs/11-ai-outfit.md +++ b/docs/11-ai-outfit.md @@ -173,6 +173,20 @@ Excel 行 → `OutfitTask` 列表的转换由 `excel_service` 完成;核心只 - 兜底:左栏滚动区横向策略由 `AlwaysOff` 改 `AsNeeded`,将来再有宽控件就滚动而非裁切。 - 可选:`_build_ui` 的 `setSizes([430,760,300])`(和=1490)大于默认窗口 1280,首屏即被压缩;改成和≤窗口的一组(如 `[400,600,300]`),非根因。 +### 10.2 切换分辨率 / AI 模型时的信息提示 + +用户**手动切换**「分辨率」或「AI 模型」下拉时,弹一个**信息框**告知影响——**只告知、不拦截、不还原**(保持新选项)。 + +- **触发**:用 `QComboBox.activated` 信号(只在用户点选时发),**不用** `currentIndexChanged`——否则启动 / `apply_config` / `_set_combo` / `_fill_sample_combo` 等**程序化赋值**会误弹。仅在**值实际改变**时弹(同项重选不弹)。 +- **形式**:`QMessageBox.information`(只有「确定」),不阻断、不回退。预览刷新逻辑不变(分辨率仍照常实时刷预览)。 +- **文案**: + - 分辨率(超时取 `ai_image_service.resolution_timeout`:512→180 / 1K→240 / 2K→360 / 4K→600 秒): + > 已切换分辨率到 **4K**。单任务超时约 600 秒,分辨率越高越慢。仅在下次「开始生成」生效,不影响正在进行的批次。 + - AI 模型(带该模型 `api_type`): + > 已切换模型到 **GPT Image 2**。调用方式:images_edits。不同模型的计费与效果可能不同。仅在下次「开始生成」生效。 +- **频率**:每次实际更换都弹一次(不是整会话只弹一次)。 +- **理由**:下拉本可逆,不做强制确认(反模式);但分辨率/模型有"慢 / 贵 / 下次才生效"的隐含代价,一次性告知最划算。 + ## 11. 配置与数据位置 遵循 cmbot「配置集中、放数据目录、凭据不入库」约定: diff --git a/tasks.md b/tasks.md index d528794..ad31230 100644 --- a/tasks.md +++ b/tasks.md @@ -1091,3 +1091,14 @@ - [x] `app/widgets/ai_outfit_panel.py`:内嵌预览改用 `render_prompt`(带当前分辨率),分辨率下拉变化时刷新预览,使「预览 = 实际发送」 - [x] 单测:带 `resolution` 追加尾巴且内容正确、无 `resolution` 不加;`build_output_requirements` 空/非空(加入 `tests/test_ai_outfit.py`,全套 12 文件绿) - [ ] 同步 `docs/ui-ai-outfit.html` 预览框示例含该段并重渲 `.png`(可选,未做) + +### 19.7 切换分辨率 / AI 模型时信息提示 — docs/11 §10.2 + +前置阅读:`docs/11-ai-outfit.md`(§10.2) + +需求:用户手动切换「分辨率」或「AI 模型」下拉时弹信息框告知影响(**只告知、不拦截、不还原**)。决策:每次实际更换都弹一次。 + +- [ ] `app/widgets/ai_outfit_panel.py`:给 `_resolution` / `_model_combo` 接 **`activated`** 信号(非 `currentIndexChanged`,避免启动/载配置误弹);仅值实际改变时 `QMessageBox.information`,保持新选项、不回退 +- [ ] 分辨率文案带 `ai_image_service.resolution_timeout` 的超时秒数(512/1K/2K/4K→180/240/360/600)+「下次生效」 +- [ ] AI 模型文案带该模型 `api_type` + 计费/效果可能不同 +「下次生效」 +- [ ] 离屏验证:程序化赋值(`apply_config`/`_set_combo`/`_fill_sample_combo`)不弹;用户切换才弹