fix: 优化生成 Prompt 的标题映射,移除技术术语

- 标签约束 → 约束
- 用户自定义内容 → 自定义内容
- 片段内容 → 参考片段
- 片段: xxx → xxx(去掉前缀)
- 智能建议补充 → 补充建议
This commit is contained in:
2026-06-26 16:05:59 +08:00
parent 1e3aa9b06b
commit b23ed28b88
2 changed files with 10 additions and 10 deletions
+5 -5
View File
@@ -339,7 +339,7 @@
// Custom content
const customContent = document.getElementById('custom-content').value.trim();
if (customContent) {
parts.push(`## 用户自定义内容\n\n${customContent}`);
parts.push(`## 自定义内容\n\n${customContent}`);
}
// Tag constraints
@@ -352,7 +352,7 @@
tagConstraints.push(`- ${option.constraint_text}`);
}
if (tagConstraints.length > 0) {
parts.push(`## 标签约束\n\n${tagConstraints.join('\n')}`);
parts.push(`## 约束\n\n${tagConstraints.join('\n')}`);
}
// Snippets
@@ -361,18 +361,18 @@
.sort((a, b) => a.sortOrder - b.sortOrder)
.map(s => {
const snippet = allSnippets.find(sn => sn.id === s.snippetId);
return snippet ? `--- 片段: ${snippet.name} ---\n${snippet.content}` : '';
return snippet ? `--- ${snippet.name} ---\n${snippet.content}` : '';
})
.filter(Boolean);
if (snippetParts.length > 0) {
parts.push(`## 片段内容\n\n${snippetParts.join('\n\n')}`);
parts.push(`## 参考片段\n\n${snippetParts.join('\n\n')}`);
}
}
// Suggestions
const adoptedSuggestions = suggestions.filter(s => s.adopted);
if (adoptedSuggestions.length > 0) {
parts.push(`## 智能建议补充\n\n${adoptedSuggestions.map(s => s.constraint_text).join('\n')}`);
parts.push(`## 补充建议\n\n${adoptedSuggestions.map(s => s.constraint_text).join('\n')}`);
}
const preview = parts.length > 0 ? parts.join('\n\n') : '选择标签和片段后,这里将实时预览最终的 Prompt...';