返回 oh-my-ppt
planning-prompt.test.ts
根目录 / tests / unit / agent-runtime / planning-prompt.test.ts
1 import { describe, expect, it } from 'vitest'
2 import { buildPlanningSystemPrompt } from '../../../src/main/agent-runtime/prompt'
3
4 describe('planning prompt composer', () => {
5 it('renders the static planning instructions from the Markdown template', () => {
6 const prompt = buildPlanningSystemPrompt(7)
7
8 expect(prompt).toContain('Return exactly 7 slide plans. The JSON array length must equal 7.')
9 expect(prompt).toContain('Never return fewer or more than 7 items.')
10 expect(prompt).toContain('if the material does not naturally fill 7 slides')
11 expect(prompt).toContain('## Content language')
12 expect(prompt).toContain('Each item must use exactly these fields: title, keyPoints, and layoutIntent.')
13 expect(prompt).not.toMatch(/\{\{[^}]+\}\}/)
14 })
15 })
16
16 lines TYPESCRIPT