feat(ai-outfit): drop product_id from prompt UI + default template
Match the doc change (8a4ebe6): remove the 插入货号 button (keep only
插入标题) and drop 货号 {product_id} from DEFAULT_OUTFIT_PROMPT. product_id
still drives Excel column B and the output filename, not the AI prompt.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -258,10 +258,10 @@ class AiOutfitPanel(QWidget):
|
|||||||
self._prompt_edit.setFixedHeight(130)
|
self._prompt_edit.setFixedHeight(130)
|
||||||
pv.addWidget(self._prompt_edit)
|
pv.addWidget(self._prompt_edit)
|
||||||
prow = QHBoxLayout()
|
prow = QHBoxLayout()
|
||||||
for text, ph in (("插入标题", "{title}"), ("插入货号", "{product_id}")):
|
insert_title_btn = QPushButton("插入标题")
|
||||||
b = QPushButton(text)
|
insert_title_btn.clicked.connect(
|
||||||
b.clicked.connect(lambda _=False, p=ph: self._prompt_edit.insertPlainText(p))
|
lambda: self._prompt_edit.insertPlainText("{title}"))
|
||||||
prow.addWidget(b)
|
prow.addWidget(insert_title_btn)
|
||||||
preview_btn = QPushButton("预览最终提示词")
|
preview_btn = QPushButton("预览最终提示词")
|
||||||
preview_btn.clicked.connect(self._preview_prompt)
|
preview_btn.clicked.connect(self._preview_prompt)
|
||||||
prow.addWidget(preview_btn)
|
prow.addWidget(preview_btn)
|
||||||
|
|||||||
@@ -33,8 +33,8 @@ _OUTFIT_PROMPT_FILENAME = "outfit_prompt.txt"
|
|||||||
|
|
||||||
# Default outfit prompt (docs/11 §7). Persisted to outfit_prompt.txt on first save.
|
# Default outfit prompt (docs/11 §7). Persisted to outfit_prompt.txt on first save.
|
||||||
DEFAULT_OUTFIT_PROMPT = (
|
DEFAULT_OUTFIT_PROMPT = (
|
||||||
"为商品「{title}」(货号 {product_id})生成人物上身实穿效果图:真人模特正面"
|
"为商品「{title}」生成人物上身实穿效果图:真人模特正面穿着这件衣服,"
|
||||||
"穿着这件衣服,完整保留款式、版型、颜色与印花图案,自然光、纯色棚拍背景,"
|
"完整保留款式、版型、颜色与印花图案,自然光、纯色棚拍背景,"
|
||||||
"电商主图风格,不加文字与促销标签。"
|
"电商主图风格,不加文字与促销标签。"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user