File tree 1 file changed +14
-13
lines changed
src/api/tools/repoHandlers/threejs
1 file changed +14
-13
lines changed Original file line number Diff line number Diff line change @@ -192,25 +192,18 @@ export async function getReferenceDocsContent({
192
192
} ) ,
193
193
) ;
194
194
195
- const content = await fetchThreeJsUrlsAsMarkdown ( urlsToFetch ) ;
196
-
197
- return {
198
- filesUsed : urlsToFetch . map ( ( { url } ) => url ) ,
199
- content : [
200
- {
201
- type : "text" as const ,
202
- text : content ,
203
- } ,
204
- ] ,
205
- } ;
195
+ return await fetchThreeJsUrlsAsMarkdown ( urlsToFetch ) ;
206
196
}
207
197
208
198
/**
209
199
* A specific tool for fetching links inside threejs documentation, since the urls are not standard
210
200
*/
211
201
export async function fetchThreeJsUrlsAsMarkdown (
212
202
urlsToFetch : { documentName ?: string ; url : string } [ ] ,
213
- ) {
203
+ ) : Promise < {
204
+ filesUsed : string [ ] ;
205
+ content : { type : "text" ; text : string } [ ] ;
206
+ } > {
214
207
// get the html content of each page
215
208
const htmlContent = await Promise . all (
216
209
urlsToFetch . map ( async ( { documentName, url } ) => {
@@ -267,5 +260,13 @@ export async function fetchThreeJsUrlsAsMarkdown(
267
260
` ;
268
261
} , "" ) ;
269
262
270
- return content ;
263
+ return {
264
+ filesUsed : urlsToFetch . map ( ( { url } ) => url ) ,
265
+ content : [
266
+ {
267
+ type : "text" as const ,
268
+ text : content ,
269
+ } ,
270
+ ] ,
271
+ } ;
271
272
}
You can’t perform that action at this time.
0 commit comments