From 5590460000ae0e350e82a5bb36c4759318a5cc48 Mon Sep 17 00:00:00 2001 From: "me@rodrigorodriguez.com" Date: Mon, 28 Oct 2024 09:43:02 -0300 Subject: [PATCH] fix(all): Removed router. --- packages/core.gbapp/services/GBCoreService.ts | 4 ++-- src/app.ts | 8 +++++--- .../ai-search.gbai/ai-search.gbdialog/start.bas | 15 +++++++++++---- 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/packages/core.gbapp/services/GBCoreService.ts b/packages/core.gbapp/services/GBCoreService.ts index c473d221..4230dbcf 100644 --- a/packages/core.gbapp/services/GBCoreService.ts +++ b/packages/core.gbapp/services/GBCoreService.ts @@ -700,14 +700,14 @@ await fs.writeFile('.env', env); let isEdit = false; // Loop through column A to find the row where name matches, or find the next empty row - for (let i = 1; i <= rows.length; i++) { + for (let i = 7; i <= rows.length; i++) { let result = rows[i - 1][0]; if (result && result.toLowerCase() === name.toLowerCase()) { address = `B${i}:B${i}`; // Match found, update value in column B isEdit = true; // We are in editing mode break; } else if (!result && lastEmptyRow === -1) { - lastEmptyRow = i; // Store the first empty row if no match is found + lastEmptyRow = i ; // Store the first empty row if no match is found } } diff --git a/src/app.ts b/src/app.ts index d0daea0a..6b302d26 100644 --- a/src/app.ts +++ b/src/app.ts @@ -283,15 +283,17 @@ export class GBServer { } else { // Setups unsecure http redirect. const proxy = httpProxy.createProxyServer({}); - GBLogEx.verbose(0, `Redirecting... ${req.originalUrl}`); if (host === process.env.API_HOST) { + GBLogEx.info(0, `Redirecting to API...`); return proxy.web(req, res, { target: 'http://localhost:1111' }); // Express server } else if (host === process.env.ROUTER_1) { - return proxy.web(req, res, { target: `http://localhost:${process.env.ROUTER_1_PORT}` }); + GBLogEx.info(0, `Redirecting...`); + return proxy.web(req, res, { target: `http://localhost:${process.env.ROUTER_1_PORT}` }); // Express server } else if (host === process.env.ROUTER_2) { - return proxy.web(req, res, { target: `http://localhost:${process.env.ROUTER_2_PORT}` }); + GBLogEx.info(0, `Redirecting...`); + return proxy.web(req, res, { target: `http://localhost:${process.env.ROUTER_2_PORT}` }); // Express server } else { await GBSSR.ssrFilter(req, res, next); } diff --git a/templates/ai-search.gbai/ai-search.gbdialog/start.bas b/templates/ai-search.gbai/ai-search.gbdialog/start.bas index f9d5075d..747f667e 100644 --- a/templates/ai-search.gbai/ai-search.gbdialog/start.bas +++ b/templates/ai-search.gbai/ai-search.gbdialog/start.bas @@ -1,12 +1,19 @@ BEGIN TALK - Welcome to the General Bots AI Search Template! + General Bots AI Search + + Comprehensive Document Search + Supports all document types, displays PDF pages with AI summaries, and integrates seamlessly with EDM systems. + We are here to assist you! To get started, please choose one of the options below: - - 1 - Scan a QR Code: Send a photo of the QR Code you would like to scan typping 'QR'. - + 1 - Scan a QR Code: Send a photo of the QR Code you would like to scan typping 'qr'. 2 - Find a Procedure: If you need information about a specific procedure, just let me know what it is, and I will help you! + Examples: + How to send a fax? + How to clean the machine? + How to find a contact? + Let’s get started! END TALK