(bookId: string)
| 71 | } |
| 72 | |
| 73 | async loadControlDocuments(bookId: string): Promise<{ |
| 74 | authorIntent: string; |
| 75 | currentFocus: string; |
| 76 | runtimeDir: string; |
| 77 | }> { |
| 78 | await this.ensureControlDocuments(bookId); |
| 79 | |
| 80 | const storyDir = join(this.bookDir(bookId), "story"); |
| 81 | const runtimeDir = join(storyDir, "runtime"); |
| 82 | const [authorIntent, currentFocus] = await Promise.all([ |
| 83 | readFile(join(storyDir, "author_intent.md"), "utf-8"), |
| 84 | readFile(join(storyDir, "current_focus.md"), "utf-8"), |
| 85 | ]); |
| 86 | |
| 87 | return { authorIntent, currentFocus, runtimeDir }; |
| 88 | } |
| 89 | |
| 90 | private async resolveControlDocumentLanguage(bookId: string): Promise<"zh" | "en"> { |
| 91 | try { |
no test coverage detected