fix(basic.gblib): update ChatServices.ts #420

Closed
eltociear wants to merge 2540 commits from patch-1 into main
Showing only changes of commit 7e6b2807a1 - Show all commits

View file

@ -1019,8 +1019,6 @@ export class KBService implements IGBKBService {
let browser = await puppeteer.launch({ headless: false }); let browser = await puppeteer.launch({ headless: false });
const page = await this.getFreshPage(browser, website); const page = await this.getFreshPage(browser, website);
page.setDefaultTimeout(2000);
page.setCacheEnabled(false);
const logo = await this.getLogoByPage(page); const logo = await this.getLogoByPage(page);
path = DialogKeywords.getGBAIPath(min.botId); path = DialogKeywords.getGBAIPath(min.botId);
@ -1058,7 +1056,15 @@ export class KBService implements IGBKBService {
} }
}); });
const maxDepth = 1; // Maximum depth of recursion page.on('dialog', async dialog => {
console.log(dialog.message());
await dialog.dismiss();
});
page.setDefaultTimeout(15000);
page.setCacheEnabled(false);
const maxDepth = 2; // Maximum depth of recursion
const visited = new Set<string>(); const visited = new Set<string>();
files = files.concat(await this.crawl(min, website, visited, 0, maxDepth, page)); files = files.concat(await this.crawl(min, website, visited, 0, maxDepth, page));