feat(suite): confirm AI writing cost before request

This commit is contained in:
chengma
2026-07-17 11:48:25 +08:00
parent a06a02ddcf
commit 1ef5721a20
11 changed files with 620 additions and 18 deletions
+3 -1
View File
@@ -3,7 +3,7 @@ id: T-650
title: 商品套图AI帮写的付费前价格确认
phase: 7
deps: [T-647]
status: TODO
status: DONE
created: 2026-07-17
---
@@ -77,3 +77,5 @@ git diff --check
## 执行记录
- 2026-07-17:根据AI帮写耗时和付费前确认需求创建任务。待实现。
- 2026-07-17:开始实现共享模型目录缓存和AI帮写付费前确认。
- 2026-07-17:已实现 `cmhub_models` 进程内模型目录缓存、设置页与商品套图共用缓存、后台目录读取 worker,以及默认取消的「开始AI帮写」付费确认。仅唯一无条件的图片理解价格显示预计扣点,实际扣点继续以网关响应 metadata 为准;关闭任务和应用会取消目录读取 worker。验证:`py -3.10 -m unittest discover -s tests`(574 项通过)、`py -3.10 -m ruff check app/cmhub_models.py app/gui/__init__.py app/gui/workers.py app/gui/tabs/product_suite.py tests/test_cmhub_models.py tests/test_workers.py tests/test_product_suite_gui.py`、`py -3.10 -m compileall app main.py`、`git diff --check` 通过。