返回 oh-my-ppt
thinking.ts
根目录 / src / shared / thinking.ts
1 import type { FontSelection, SourceDocumentPlan } from './generation'
2
3 export type ThinkingStage = 'collect' | 'outline' | 'draft' | 'refine' | 'ready'
4
5 export interface ThinkingSource {
6 id: string
7 name: string
8 kind: 'markdown' | 'text' | 'csv' | 'docx' | 'image'
9 }
10
11 export interface ThinkingWorkspace {
12 thinkingId: string
13 thinkingMd: string
14 contextMd: string
15 stage: ThinkingStage
16 sources: ThinkingSource[]
17 messages: ThinkingChatMessage[]
18 }
19
20 export interface ThinkingWorkspaceListItem {
21 thinkingId: string
22 updatedAt: number
23 topic: string
24 stage: ThinkingStage
25 }
26
27 export interface ThinkingChatMessage {
28 role: 'user' | 'assistant'
29 content: string
30 timestamp: number
31 attachments?: ThinkingSource[]
32 }
33
34 export interface ThinkingChatResult {
35 reply: string
36 thinkingMd: string
37 contextMd: string
38 stage: ThinkingStage
39 }
40
41 export interface ThinkingPrepareGenerationResult {
42 thinkingDocumentPath: string
43 topic: string
44 pageCount: number
45 styleId: string
46 styleText?: string
47 fontSelection: FontSelection
48 sourcePlan?: SourceDocumentPlan
49 }
50
51 export interface ThinkingPageOutlineUpdate {
52 pageNumber: number
53 title: string
54 role: string
55 objective: string
56 summary: string
57 keyPoints: string[]
58 }
59
59 lines TYPESCRIPT