feat: 实现写作第一性原理相关功能

- 语义锚定:新增大纲模式输入 (WriterPanel.vue, appStore.js)
- 风格对齐:实现参考案例风格提取与可视化 (DeepSeekAPI.js, appStore.js, WriterPanel.vue)
- 认知模拟:引入深度模式 Agentic Workflow (Draft->Critique->Refine)
- 优化 Prompt 构建:支持风格标签注入 (promptBuilder.js)
- 更新文档:添加第一性原理功能说明 (README.md)
This commit is contained in:
empty
2026-01-08 11:11:28 +08:00
parent 3d0d16a3e5
commit 3a2d2c6f0c
5 changed files with 206 additions and 27 deletions

View File

@@ -12,7 +12,10 @@ export const buildPrompt = (task, constraints, references) => {
prompt += `# Style Reference Cases\n`;
prompt += `请深度学习并模仿以下参考资料的语调、用词习惯、句式结构和情感色彩:\n`;
references.forEach((ref, idx) => {
prompt += `<case_${idx + 1} title="${ref.title}">\n${ref.content}\n</case_${idx + 1}>\n\n`;
const styleInfo = ref.styleTags && ref.styleTags.length > 0
? `\nStyle Tags: ${ref.styleTags.join(', ')}`
: '';
prompt += `<case_${idx + 1} title="${ref.title}">${styleInfo}\n${ref.content}\n</case_${idx + 1}>\n\n`;
});
}