@roomi-fields/notebooklm-mcp 1.3.5 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +93 -658
- package/dist/accounts/account-manager.d.ts +163 -0
- package/dist/accounts/account-manager.d.ts.map +1 -0
- package/dist/accounts/account-manager.js +614 -0
- package/dist/accounts/account-manager.js.map +1 -0
- package/dist/accounts/auto-login-manager.d.ts +62 -0
- package/dist/accounts/auto-login-manager.d.ts.map +1 -0
- package/dist/accounts/auto-login-manager.js +537 -0
- package/dist/accounts/auto-login-manager.js.map +1 -0
- package/dist/accounts/crypto.d.ts +45 -0
- package/dist/accounts/crypto.d.ts.map +1 -0
- package/dist/accounts/crypto.js +138 -0
- package/dist/accounts/crypto.js.map +1 -0
- package/dist/accounts/index.d.ts +14 -0
- package/dist/accounts/index.d.ts.map +1 -0
- package/dist/accounts/index.js +14 -0
- package/dist/accounts/index.js.map +1 -0
- package/dist/accounts/types.d.ts +103 -0
- package/dist/accounts/types.d.ts.map +1 -0
- package/dist/accounts/types.js +7 -0
- package/dist/accounts/types.js.map +1 -0
- package/dist/auth/auth-manager.d.ts +9 -2
- package/dist/auth/auth-manager.d.ts.map +1 -1
- package/dist/auth/auth-manager.js +60 -6
- package/dist/auth/auth-manager.js.map +1 -1
- package/dist/auto-discovery/auto-discovery.d.ts.map +1 -1
- package/dist/auto-discovery/auto-discovery.js +2 -1
- package/dist/auto-discovery/auto-discovery.js.map +1 -1
- package/dist/cli/accounts.d.ts +13 -0
- package/dist/cli/accounts.d.ts.map +1 -0
- package/dist/cli/accounts.js +195 -0
- package/dist/cli/accounts.js.map +1 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +9 -0
- package/dist/config.js.map +1 -1
- package/dist/content/content-generator.d.ts +153 -0
- package/dist/content/content-generator.d.ts.map +1 -0
- package/dist/content/content-generator.js +637 -0
- package/dist/content/content-generator.js.map +1 -0
- package/dist/content/content-manager.d.ts +364 -0
- package/dist/content/content-manager.d.ts.map +1 -0
- package/dist/content/content-manager.js +3846 -0
- package/dist/content/content-manager.js.map +1 -0
- package/dist/content/content-templates.d.ts +183 -0
- package/dist/content/content-templates.d.ts.map +1 -0
- package/dist/content/content-templates.js +719 -0
- package/dist/content/content-templates.js.map +1 -0
- package/dist/content/index.d.ts +14 -0
- package/dist/content/index.d.ts.map +1 -0
- package/dist/content/index.js +14 -0
- package/dist/content/index.js.map +1 -0
- package/dist/content/types.d.ts +285 -0
- package/dist/content/types.d.ts.map +1 -0
- package/dist/content/types.js +10 -0
- package/dist/content/types.js.map +1 -0
- package/dist/errors.d.ts +1 -1
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js.map +1 -1
- package/dist/http-wrapper.d.ts +7 -0
- package/dist/http-wrapper.d.ts.map +1 -1
- package/dist/http-wrapper.js +449 -29
- package/dist/http-wrapper.js.map +1 -1
- package/dist/index.js +26 -2
- package/dist/index.js.map +1 -1
- package/dist/library/notebook-library.d.ts +4 -0
- package/dist/library/notebook-library.d.ts.map +1 -1
- package/dist/library/notebook-library.js +20 -3
- package/dist/library/notebook-library.js.map +1 -1
- package/dist/session/browser-session.d.ts +35 -8
- package/dist/session/browser-session.d.ts.map +1 -1
- package/dist/session/browser-session.js +242 -28
- package/dist/session/browser-session.js.map +1 -1
- package/dist/session/session-manager.d.ts +6 -0
- package/dist/session/session-manager.d.ts.map +1 -1
- package/dist/session/session-manager.js +46 -14
- package/dist/session/session-manager.js.map +1 -1
- package/dist/session/shared-context-manager.d.ts +3 -3
- package/dist/session/shared-context-manager.d.ts.map +1 -1
- package/dist/session/shared-context-manager.js +8 -7
- package/dist/session/shared-context-manager.js.map +1 -1
- package/dist/stdio-http-proxy.d.ts +24 -0
- package/dist/stdio-http-proxy.d.ts.map +1 -0
- package/dist/stdio-http-proxy.js +592 -0
- package/dist/stdio-http-proxy.js.map +1 -0
- package/dist/tools/index.d.ts +106 -1
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +1028 -7
- package/dist/tools/index.js.map +1 -1
- package/dist/types.d.ts +81 -17
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/citation-extractor.d.ts +66 -0
- package/dist/utils/citation-extractor.d.ts.map +1 -0
- package/dist/utils/citation-extractor.js +492 -0
- package/dist/utils/citation-extractor.js.map +1 -0
- package/dist/utils/page-utils.d.ts +8 -0
- package/dist/utils/page-utils.d.ts.map +1 -1
- package/dist/utils/page-utils.js +112 -8
- package/dist/utils/page-utils.js.map +1 -1
- package/docs/ARCHITECTURE_MIGRATION_STUDY.md +894 -0
- package/docs/CHROME_PROFILE_LIMITATION.md +15 -1
- package/docs/MULTI_ACCOUNT_SYSTEM.md +304 -0
- package/package.json +10 -10
- package/dist/__tests__/cleanup-manager.test.d.ts +0 -2
- package/dist/__tests__/cleanup-manager.test.d.ts.map +0 -1
- package/dist/__tests__/cleanup-manager.test.js +0 -341
- package/dist/__tests__/cleanup-manager.test.js.map +0 -1
- package/dist/__tests__/config-parsing.test.d.ts +0 -2
- package/dist/__tests__/config-parsing.test.d.ts.map +0 -1
- package/dist/__tests__/config-parsing.test.js +0 -338
- package/dist/__tests__/config-parsing.test.js.map +0 -1
- package/dist/__tests__/config.test.d.ts +0 -2
- package/dist/__tests__/config.test.d.ts.map +0 -1
- package/dist/__tests__/config.test.js +0 -267
- package/dist/__tests__/config.test.js.map +0 -1
- package/dist/__tests__/errors.test.d.ts +0 -2
- package/dist/__tests__/errors.test.d.ts.map +0 -1
- package/dist/__tests__/errors.test.js +0 -166
- package/dist/__tests__/errors.test.js.map +0 -1
- package/dist/__tests__/logger.test.d.ts +0 -2
- package/dist/__tests__/logger.test.d.ts.map +0 -1
- package/dist/__tests__/logger.test.js +0 -324
- package/dist/__tests__/logger.test.js.map +0 -1
- package/dist/__tests__/page-utils.test.d.ts +0 -2
- package/dist/__tests__/page-utils.test.d.ts.map +0 -1
- package/dist/__tests__/page-utils.test.js +0 -349
- package/dist/__tests__/page-utils.test.js.map +0 -1
- package/dist/__tests__/setup-verification.test.d.ts +0 -2
- package/dist/__tests__/setup-verification.test.d.ts.map +0 -1
- package/dist/__tests__/setup-verification.test.js +0 -15
- package/dist/__tests__/setup-verification.test.js.map +0 -1
- package/dist/__tests__/stealth-utils.test.d.ts +0 -2
- package/dist/__tests__/stealth-utils.test.d.ts.map +0 -1
- package/dist/__tests__/stealth-utils.test.js +0 -413
- package/dist/__tests__/stealth-utils.test.js.map +0 -1
- package/dist/__tests__/types.test.d.ts +0 -2
- package/dist/__tests__/types.test.d.ts.map +0 -1
- package/dist/__tests__/types.test.js +0 -461
- package/dist/__tests__/types.test.js.map +0 -1
|
@@ -0,0 +1,364 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Content Manager
|
|
3
|
+
*
|
|
4
|
+
* Handles NotebookLM content operations:
|
|
5
|
+
* - Source/document upload
|
|
6
|
+
* - Content generation (audio, briefing, study guides, etc.)
|
|
7
|
+
* - Content listing and download
|
|
8
|
+
*
|
|
9
|
+
* Uses Playwright to interact with NotebookLM's web interface.
|
|
10
|
+
*/
|
|
11
|
+
import type { Page } from 'patchright';
|
|
12
|
+
import type { SourceUploadInput, SourceUploadResult, SourceDeleteInput, SourceDeleteResult, ContentType, ContentGenerationInput, ContentGenerationResult, NotebookSource, GeneratedContent, NotebookContentOverview, ContentDownloadResult, NoteInput, NoteResult, SaveChatToNoteInput, SaveChatToNoteResult, NoteToSourceInput, NoteToSourceResult } from './types.js';
|
|
13
|
+
export declare class ContentManager {
|
|
14
|
+
private page;
|
|
15
|
+
constructor(page: Page);
|
|
16
|
+
/**
|
|
17
|
+
* Add a source to the current notebook
|
|
18
|
+
*/
|
|
19
|
+
addSource(input: SourceUploadInput): Promise<SourceUploadResult>;
|
|
20
|
+
/**
|
|
21
|
+
* Click the "Add source" button
|
|
22
|
+
*/
|
|
23
|
+
private clickAddSource;
|
|
24
|
+
/**
|
|
25
|
+
* Ensure we're on the Sources panel
|
|
26
|
+
*/
|
|
27
|
+
private ensureSourcesPanel;
|
|
28
|
+
/**
|
|
29
|
+
* Debug helper to log page content for selector debugging
|
|
30
|
+
*/
|
|
31
|
+
private debugPageContent;
|
|
32
|
+
/**
|
|
33
|
+
* Wait for upload dialog to appear
|
|
34
|
+
*/
|
|
35
|
+
private waitForUploadDialog;
|
|
36
|
+
/**
|
|
37
|
+
* Upload a local file
|
|
38
|
+
*/
|
|
39
|
+
private uploadFile;
|
|
40
|
+
/**
|
|
41
|
+
* Upload from URL
|
|
42
|
+
*/
|
|
43
|
+
private uploadUrl;
|
|
44
|
+
/**
|
|
45
|
+
* Upload text content
|
|
46
|
+
*/
|
|
47
|
+
private uploadText;
|
|
48
|
+
/**
|
|
49
|
+
* Upload from Google Drive
|
|
50
|
+
*/
|
|
51
|
+
private uploadGoogleDrive;
|
|
52
|
+
/**
|
|
53
|
+
* Upload YouTube video
|
|
54
|
+
*/
|
|
55
|
+
private uploadYouTube;
|
|
56
|
+
/**
|
|
57
|
+
* Click the upload/add button
|
|
58
|
+
*/
|
|
59
|
+
private clickUploadButton;
|
|
60
|
+
/**
|
|
61
|
+
* Wait for source to finish processing
|
|
62
|
+
* @param sourceName The name we expect the source to have
|
|
63
|
+
* @param _textPreview Optional first words of text (for text sources - NotebookLM may use this as name)
|
|
64
|
+
* @param expectedNotebookUuid Optional UUID of the notebook we expect to be on (to detect redirects)
|
|
65
|
+
*/
|
|
66
|
+
private waitForSourceProcessing;
|
|
67
|
+
/**
|
|
68
|
+
* Send a message in the chat interface (without waiting for response)
|
|
69
|
+
* This is the new way to generate content in NotebookLM
|
|
70
|
+
* Uses the same typing and submission approach as ask_question for reliability
|
|
71
|
+
*/
|
|
72
|
+
private sendChatMessage;
|
|
73
|
+
/**
|
|
74
|
+
* Wait for generated content to appear in chat
|
|
75
|
+
* Uses the same proven approach as /ask endpoint (waitForLatestAnswer with full timeout)
|
|
76
|
+
*/
|
|
77
|
+
private waitForGeneratedContent;
|
|
78
|
+
/**
|
|
79
|
+
* Scroll chat container to bottom to ensure latest messages are visible
|
|
80
|
+
*/
|
|
81
|
+
private scrollChatToBottom;
|
|
82
|
+
/**
|
|
83
|
+
* Generate content (audio overview, presentation, report)
|
|
84
|
+
*
|
|
85
|
+
* Supported content types:
|
|
86
|
+
* - audio_overview: Uses real Studio UI buttons for audio podcast generation
|
|
87
|
+
* - video: Uses generic ContentGenerator for video generation (with format, language, style options)
|
|
88
|
+
* - infographic: Uses generic ContentGenerator for infographic generation (with format options)
|
|
89
|
+
* - presentation: Uses generic ContentGenerator for slides generation (with format options)
|
|
90
|
+
* - report: Uses generic ContentGenerator for briefing document generation (with format options)
|
|
91
|
+
* - data_table: Uses generic ContentGenerator for data table generation (with format options)
|
|
92
|
+
*
|
|
93
|
+
* NOTE: Other content types (study_guide, faq, timeline, table_of_contents)
|
|
94
|
+
* were removed because they only sent chat prompts instead of clicking actual
|
|
95
|
+
* NotebookLM Studio buttons.
|
|
96
|
+
*/
|
|
97
|
+
generateContent(input: ContentGenerationInput): Promise<ContentGenerationResult>;
|
|
98
|
+
/**
|
|
99
|
+
* Generate content using the generic ContentGenerator
|
|
100
|
+
*
|
|
101
|
+
* This method handles all content types except audio_overview:
|
|
102
|
+
* - video: With format (brief/explainer), language, and visual style options
|
|
103
|
+
* - infographic: With format (horizontal/vertical) and language options
|
|
104
|
+
* - presentation: With format (overview/detailed) and language options
|
|
105
|
+
* - report: With format (summary/detailed) and language options
|
|
106
|
+
* - data_table: With format (simple/detailed) and language options
|
|
107
|
+
*
|
|
108
|
+
* @param input Content generation input with all options
|
|
109
|
+
* @returns Content generation result
|
|
110
|
+
*/
|
|
111
|
+
private generateGenericContent;
|
|
112
|
+
/**
|
|
113
|
+
* Generate Audio Overview (podcast)
|
|
114
|
+
*
|
|
115
|
+
* NOTE (Dec 2024): NotebookLM UI has changed significantly.
|
|
116
|
+
* Audio generation now works via chat requests or may require specific UI interaction.
|
|
117
|
+
* This method attempts both approaches.
|
|
118
|
+
*/
|
|
119
|
+
generateAudioOverview(input: ContentGenerationInput): Promise<ContentGenerationResult>;
|
|
120
|
+
/**
|
|
121
|
+
* Generate Presentation/Slides using the generic ContentGenerator
|
|
122
|
+
*
|
|
123
|
+
* This uses the generic content generation architecture that:
|
|
124
|
+
* 1. Navigates to Studio panel
|
|
125
|
+
* 2. Looks for presentation/slides button
|
|
126
|
+
* 3. Falls back to chat-based generation if button not found
|
|
127
|
+
*
|
|
128
|
+
* @param input Content generation input with optional custom instructions
|
|
129
|
+
* @returns Content generation result
|
|
130
|
+
*/
|
|
131
|
+
generatePresentation(input: ContentGenerationInput): Promise<ContentGenerationResult>;
|
|
132
|
+
/**
|
|
133
|
+
* Generate Report/Briefing Document using the generic ContentGenerator
|
|
134
|
+
*
|
|
135
|
+
* Creates a comprehensive briefing document (2,000-3,000 words) that summarizes
|
|
136
|
+
* key findings, insights, and recommendations from notebook sources.
|
|
137
|
+
* Can be exported as PDF or DOCX format.
|
|
138
|
+
*
|
|
139
|
+
* This uses the generic content generation architecture that:
|
|
140
|
+
* 1. Navigates to Studio panel
|
|
141
|
+
* 2. Looks for briefing/report button
|
|
142
|
+
* 3. Falls back to chat-based generation if button not found
|
|
143
|
+
*
|
|
144
|
+
* @param input Content generation input with optional custom instructions
|
|
145
|
+
* @returns Content generation result with text content
|
|
146
|
+
*/
|
|
147
|
+
generateReport(input: ContentGenerationInput): Promise<ContentGenerationResult>;
|
|
148
|
+
/**
|
|
149
|
+
* Generate Infographic using the generic ContentGenerator
|
|
150
|
+
*
|
|
151
|
+
* Creates a visual infographic from the notebook sources.
|
|
152
|
+
* Supports two formats:
|
|
153
|
+
* - horizontal (16:9): Landscape format for presentations/displays
|
|
154
|
+
* - vertical (9:16): Portrait format for social media/mobile
|
|
155
|
+
*
|
|
156
|
+
* This uses the generic content generation architecture that:
|
|
157
|
+
* 1. Navigates to Studio panel
|
|
158
|
+
* 2. Looks for infographic button
|
|
159
|
+
* 3. Falls back to chat-based generation if button not found
|
|
160
|
+
*
|
|
161
|
+
* @param input Content generation input with optional custom instructions and format
|
|
162
|
+
* @returns Content generation result
|
|
163
|
+
*/
|
|
164
|
+
generateInfographic(input: ContentGenerationInput): Promise<ContentGenerationResult>;
|
|
165
|
+
/**
|
|
166
|
+
* Generate a Data Table using the generic ContentGenerator
|
|
167
|
+
*
|
|
168
|
+
* Creates a structured table that organizes key information from notebook sources.
|
|
169
|
+
* The generated table can be exported as CSV or Excel format.
|
|
170
|
+
*
|
|
171
|
+
* @param input Content generation input with optional custom instructions
|
|
172
|
+
* @returns Content generation result with table data
|
|
173
|
+
*/
|
|
174
|
+
generateDataTable(input: ContentGenerationInput): Promise<ContentGenerationResult>;
|
|
175
|
+
/**
|
|
176
|
+
* Generate a Video using the generic ContentGenerator
|
|
177
|
+
*
|
|
178
|
+
* Creates a video summary that visually explains the main topics from notebook sources.
|
|
179
|
+
* Video generation may take several minutes depending on content complexity.
|
|
180
|
+
*
|
|
181
|
+
* Supported formats:
|
|
182
|
+
* - brief: Short video summary (2-3 minutes)
|
|
183
|
+
* - explainer: Detailed explanation video (5-10 minutes)
|
|
184
|
+
*
|
|
185
|
+
* This uses the generic content generation architecture that:
|
|
186
|
+
* 1. Navigates to Studio panel
|
|
187
|
+
* 2. Looks for video generation button
|
|
188
|
+
* 3. Falls back to chat-based generation if button not found
|
|
189
|
+
*
|
|
190
|
+
* @param input Content generation input with optional custom instructions and format
|
|
191
|
+
* @returns Content generation result with video data
|
|
192
|
+
*/
|
|
193
|
+
generateVideo(input: ContentGenerationInput): Promise<ContentGenerationResult>;
|
|
194
|
+
/**
|
|
195
|
+
* Navigate to Discussion panel (chat)
|
|
196
|
+
*/
|
|
197
|
+
private navigateToDiscussion;
|
|
198
|
+
/**
|
|
199
|
+
* Navigate to Studio panel
|
|
200
|
+
*/
|
|
201
|
+
private navigateToStudio;
|
|
202
|
+
/**
|
|
203
|
+
* Add custom instructions for content generation
|
|
204
|
+
*/
|
|
205
|
+
private addCustomInstructions;
|
|
206
|
+
/**
|
|
207
|
+
* Wait for audio generation to complete
|
|
208
|
+
*/
|
|
209
|
+
private waitForAudioGeneration;
|
|
210
|
+
/**
|
|
211
|
+
* Get overview of notebook content (sources and generated content)
|
|
212
|
+
*/
|
|
213
|
+
getContentOverview(): Promise<NotebookContentOverview>;
|
|
214
|
+
/**
|
|
215
|
+
* List all sources in the notebook
|
|
216
|
+
*/
|
|
217
|
+
listSources(): Promise<NotebookSource[]>;
|
|
218
|
+
/**
|
|
219
|
+
* Delete a source from the current notebook
|
|
220
|
+
*
|
|
221
|
+
* @param input - Either sourceId or sourceName to identify the source to delete
|
|
222
|
+
* @returns Result indicating success or failure
|
|
223
|
+
*/
|
|
224
|
+
deleteSource(input: SourceDeleteInput): Promise<SourceDeleteResult>;
|
|
225
|
+
/**
|
|
226
|
+
* Find a source element by ID or name
|
|
227
|
+
*/
|
|
228
|
+
private findSourceElement;
|
|
229
|
+
/**
|
|
230
|
+
* Open the source menu (3-dot menu)
|
|
231
|
+
*/
|
|
232
|
+
private openSourceMenu;
|
|
233
|
+
/**
|
|
234
|
+
* Click the delete option in the menu
|
|
235
|
+
*/
|
|
236
|
+
private clickDeleteOption;
|
|
237
|
+
/**
|
|
238
|
+
* Confirm deletion if a confirmation dialog appears
|
|
239
|
+
*/
|
|
240
|
+
private confirmDeletion;
|
|
241
|
+
/**
|
|
242
|
+
* List all generated content
|
|
243
|
+
*/
|
|
244
|
+
listGeneratedContent(): Promise<GeneratedContent[]>;
|
|
245
|
+
/**
|
|
246
|
+
* Download generated content (audio, video, infographic)
|
|
247
|
+
*
|
|
248
|
+
* For media content types that produce downloadable files:
|
|
249
|
+
* - audio_overview: WAV audio file
|
|
250
|
+
* - video: MP4 video file
|
|
251
|
+
* - infographic: PNG image file
|
|
252
|
+
*
|
|
253
|
+
* Note: Text-based content (report, presentation, data_table) is returned
|
|
254
|
+
* directly in the generation response, not as downloadable files.
|
|
255
|
+
*
|
|
256
|
+
* @param contentType Type of content to download
|
|
257
|
+
* @param outputPath Optional path to save the file
|
|
258
|
+
* @returns Download result with file path
|
|
259
|
+
*/
|
|
260
|
+
downloadContent(contentType: ContentType, outputPath?: string): Promise<ContentDownloadResult>;
|
|
261
|
+
/**
|
|
262
|
+
* Get panel configuration for a content type
|
|
263
|
+
*/
|
|
264
|
+
private getContentPanelConfig;
|
|
265
|
+
/**
|
|
266
|
+
* Navigate to content panel
|
|
267
|
+
*/
|
|
268
|
+
private navigateToContentPanel;
|
|
269
|
+
/**
|
|
270
|
+
* Find download button on the page
|
|
271
|
+
*/
|
|
272
|
+
private findDownloadButton;
|
|
273
|
+
/**
|
|
274
|
+
* Get audio source URL directly from audio element
|
|
275
|
+
*/
|
|
276
|
+
private getAudioSourceUrl;
|
|
277
|
+
/**
|
|
278
|
+
* Download audio content
|
|
279
|
+
* @deprecated Use downloadContent('audio_overview', outputPath) instead
|
|
280
|
+
*/
|
|
281
|
+
downloadAudio(outputPath?: string): Promise<ContentDownloadResult>;
|
|
282
|
+
/**
|
|
283
|
+
* Export presentation to Google Slides
|
|
284
|
+
* Finds and clicks the "Open in Slides" button to get the Google Slides URL
|
|
285
|
+
*/
|
|
286
|
+
private exportPresentationToGoogleSlides;
|
|
287
|
+
/**
|
|
288
|
+
* Export data table to Google Sheets
|
|
289
|
+
* Finds and clicks the "Open in Sheets" button to get the Google Sheets URL
|
|
290
|
+
*/
|
|
291
|
+
private exportDataTableToGoogleSheets;
|
|
292
|
+
/**
|
|
293
|
+
* Create a note in the NotebookLM Studio panel
|
|
294
|
+
*
|
|
295
|
+
* Notes are user-created annotations that appear in the notebook's Studio panel.
|
|
296
|
+
* They allow you to save research findings, summaries, or key insights.
|
|
297
|
+
*
|
|
298
|
+
* @param input Note input with title and content
|
|
299
|
+
* @returns NoteResult with success status
|
|
300
|
+
*/
|
|
301
|
+
createNote(input: NoteInput): Promise<NoteResult>;
|
|
302
|
+
/**
|
|
303
|
+
* Debug helper to log Studio panel elements
|
|
304
|
+
*/
|
|
305
|
+
private debugStudioElements;
|
|
306
|
+
/**
|
|
307
|
+
* Save the current chat/discussion to a note
|
|
308
|
+
*
|
|
309
|
+
* This method extracts all messages from the NotebookLM chat/discussion panel
|
|
310
|
+
* and creates a note with the chat summary.
|
|
311
|
+
*
|
|
312
|
+
* @param input Optional input with custom title
|
|
313
|
+
* @returns SaveChatToNoteResult with success status and message count
|
|
314
|
+
*/
|
|
315
|
+
saveChatToNote(input?: SaveChatToNoteInput): Promise<SaveChatToNoteResult>;
|
|
316
|
+
/**
|
|
317
|
+
* Internal method to perform the save chat to note operation
|
|
318
|
+
*/
|
|
319
|
+
private performSaveChatToNote;
|
|
320
|
+
/**
|
|
321
|
+
* Extract chat messages from the Discussion panel
|
|
322
|
+
*
|
|
323
|
+
* @returns Array of message objects with role (user/assistant) and content
|
|
324
|
+
*/
|
|
325
|
+
private extractChatMessages;
|
|
326
|
+
/**
|
|
327
|
+
* Format extracted chat messages as a note
|
|
328
|
+
*
|
|
329
|
+
* @param messages Array of chat messages
|
|
330
|
+
* @param title Note title
|
|
331
|
+
* @returns Formatted note content
|
|
332
|
+
*/
|
|
333
|
+
private formatChatAsNote;
|
|
334
|
+
/**
|
|
335
|
+
* Convert a note to a source document in NotebookLM
|
|
336
|
+
*
|
|
337
|
+
* This feature allows users to convert an existing note into a source,
|
|
338
|
+
* making the note content available for RAG queries. The method:
|
|
339
|
+
* 1. Finds the note by title or ID in the Studio panel
|
|
340
|
+
* 2. Attempts to use NotebookLM's native "Convert to source" feature if available
|
|
341
|
+
* 3. Falls back to extracting note content and creating a text source if not
|
|
342
|
+
*
|
|
343
|
+
* @param input Note identification (title or ID)
|
|
344
|
+
* @returns NoteToSourceResult with source information
|
|
345
|
+
*/
|
|
346
|
+
convertNoteToSource(input: NoteToSourceInput): Promise<NoteToSourceResult>;
|
|
347
|
+
/**
|
|
348
|
+
* Find a note element in the Studio panel by title or ID
|
|
349
|
+
*/
|
|
350
|
+
private findNoteElement;
|
|
351
|
+
/**
|
|
352
|
+
* Try to use NotebookLM's native "Convert to source" or "Add to sources" feature
|
|
353
|
+
*/
|
|
354
|
+
private tryNativeNoteToSourceConversion;
|
|
355
|
+
/**
|
|
356
|
+
* Open the menu for a note element
|
|
357
|
+
*/
|
|
358
|
+
private openNoteMenu;
|
|
359
|
+
/**
|
|
360
|
+
* Extract the content of a note for fallback conversion
|
|
361
|
+
*/
|
|
362
|
+
private extractNoteContent;
|
|
363
|
+
}
|
|
364
|
+
//# sourceMappingURL=content-manager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"content-manager.d.ts","sourceRoot":"","sources":["../../src/content/content-manager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAW,MAAM,YAAY,CAAC;AAOhD,OAAO,KAAK,EACV,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,WAAW,EACX,sBAAsB,EACtB,uBAAuB,EACvB,cAAc,EACd,gBAAgB,EAChB,uBAAuB,EACvB,qBAAqB,EACrB,SAAS,EACT,UAAU,EACV,mBAAmB,EACnB,oBAAoB,EACpB,iBAAiB,EACjB,kBAAkB,EACnB,MAAM,YAAY,CAAC;AAMpB,qBAAa,cAAc;IACzB,OAAO,CAAC,IAAI,CAAO;gBAEP,IAAI,EAAE,IAAI;IAQtB;;OAEG;IACG,SAAS,CAAC,KAAK,EAAE,iBAAiB,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAsCtE;;OAEG;YACW,cAAc;IA+E5B;;OAEG;YACW,kBAAkB;IAyEhC;;OAEG;YACW,gBAAgB;IAyB9B;;OAEG;YACW,mBAAmB;IAsBjC;;OAEG;YACW,UAAU;IAqFxB;;OAEG;YACW,SAAS;IA8KvB;;OAEG;YACW,UAAU;IA8NxB;;OAEG;YACW,iBAAiB;IAc/B;;OAEG;YACW,aAAa;IAkI3B;;OAEG;YACW,iBAAiB;IAsD/B;;;;;OAKG;YACW,uBAAuB;IA2PrC;;;;OAIG;YACW,eAAe;IA4D7B;;;OAGG;Y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