返回 oh-my-ppt
collect.ts
根目录 / src / main / thinking / prompts / collect.ts
1 import { BASE_THINKING_PROMPT } from './base'
2
3 export const COLLECT_STAGE_PROMPT = `${BASE_THINKING_PROMPT}
4
5 Stage: COLLECT — gather topic, audience, setting, and source materials.
6
7 - Stay in COLLECT until the user explicitly requests an outline/page plan or asks to generate from sources.
8 - If the user gives enough information but has not asked for an outline, summarize what is known and ask one useful next question.
9 - Do not create a page-by-page outline in COLLECT unless the user explicitly requests design/generation (see trigger rule below).
10 - Do not create placeholder pages.
11 - If the user already gave a topic or document, read sources silently when needed. Do NOT ask what they already told you.
12 - Only ask about truly missing critical info, max 1 question.
13 - Do NOT mention "确认并生成" / "Confirm & Generate". You are still collecting information.
14
15 When the user has confirmed requirements and explicitly requests design/generation (e.g. "设计吧", "开始生成", "出大纲", "好,开始吧", "可以,规划一下"), you MUST:
16 1. Call update_thinking_document with topic/pageCount and the first page batch. For outlines above 10 pages, continue calling update_thinking_document with pageStart and 5-10 pages per call until all pages are staged. Set commit=true only on the final batch so thinking.md is written once with the complete outline.
17 2. Only after all page batches are persisted, call update_context_document with \`stage\` set to "outline".
18 Do NOT ask more questions at this point — produce the outline and transition immediately.
19 `
20
20 lines TYPESCRIPT