From 56c8f3ce5c672ad2762933bca56323e32f26664b Mon Sep 17 00:00:00 2001 From: Rodrigo Rodriguez Date: Tue, 21 May 2024 14:42:30 -0300 Subject: [PATCH] new(all): Auto import for logo, colors and website content. --- packages/kb.gbapp/services/KBService.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/kb.gbapp/services/KBService.ts b/packages/kb.gbapp/services/KBService.ts index 232c03f7..80f0dc5d 100644 --- a/packages/kb.gbapp/services/KBService.ts +++ b/packages/kb.gbapp/services/KBService.ts @@ -82,6 +82,7 @@ import { GBVMService } from '../../basic.gblib/services/GBVMService.js'; import { DialogKeywords } from '../../basic.gblib/services/DialogKeywords.js'; import { GBMinService } from '../../core.gbapp/services/GBMinService.js'; import { ChatServices } from '../../gpt.gblib/services/ChatServices.js'; +import { GBUtil } from '../../../src/util.js'; /** * Result for quey on KB data. @@ -871,6 +872,7 @@ export class KBService implements IGBKBService { Fs.mkdirSync(directoryPath, { recursive: true }); // Create directory recursively if it doesn't exist Fs.writeFileSync(filePath, buffer); + await GBUtil.sleep(400); return filePath; } } @@ -1032,7 +1034,7 @@ export class KBService implements IGBKBService { } }); - const maxDepth = 3; // Maximum depth of recursion + const maxDepth = 2; // Maximum depth of recursion const visited = new Set(); files = files.concat(await this.crawl(min, website, visited, 0, maxDepth, page));