fix(basic.gblib): GBAI automatic retrieval.

This commit is contained in:
Rodrigo Rodriguez 2023-03-09 18:56:55 -03:00
parent 04e69b9d99
commit 0ef0fc01f5
5 changed files with 8 additions and 8 deletions

View file

@ -1101,7 +1101,7 @@ export class SystemKeywords {
const { min, user, params } = await DialogKeywords.getProcessInfo(pid);
let { baseUrl, client } = await GBDeployer.internalGetDriveClient(min);
const botId = min.instance.botId;
const path = DialogKeywords.getGBAIPath(min.botId, `gbdrive`);
let path = DialogKeywords.getGBAIPath(min.botId, `gbdrive`);
// Extracts each part of path to call create folder to each
@ -1253,7 +1253,7 @@ export class SystemKeywords {
const path = DialogKeywords.getGBAIPath(min.botId,`gbdrive`);
const root = path;
const srcPath = urlJoin(root, src);
const dstPath = urlJoin(path dest);
const dstPath = urlJoin(path, dest);
// Checks if the destination contains subfolders that
// need to be created.

View file

@ -931,7 +931,7 @@ export class GBMinService {
const folder = `work/${path}/cache`;
const filename = `${GBAdminService.generateUuid()}.png`;
Fs.writeFileSync(path.join(folder, filename), data);
Fs.writeFileSync(urlJoin(folder, filename), data);
step.context.activity.text = urlJoin(
GBServer.globals.publicAddress,
`${min.instance.botId}`,

View file

@ -284,10 +284,10 @@ export class GBSSR {
GBServer.globals.minInstances[0]:
GBServer.globals.minInstances.filter(p => p.instance.botId === botId)[0];
const path = DialogKeywords.getGBAIPath(min.botId,`gbui`);
let path = DialogKeywords.getGBAIPath(min.botId,`gbui`);
if (min && req.originalUrl && prerender && exclude) {
const path = Path.join(
path = Path.join(
process.env.PWD,
'work',
path,
@ -298,7 +298,7 @@ export class GBSSR {
return true;
} else {
const path = Path.join(
path = Path.join(
process.env.PWD,
GBDeployer.deployFolder,
GBMinService.uiPackage,

View file

@ -73,7 +73,7 @@ import { min } from 'lodash';
import { GBAdminService } from '../../admin.gbapp/services/GBAdminService.js';
import { text } from 'body-parser';
import { GBVMService } from '../../basic.gblib/services/GBVMService.js';
import { DialogKeywords } from 'packages/basic.gblib/services/DialogKeywords.js';
import { DialogKeywords } from '../../basic.gblib/services/DialogKeywords.js';
/**
* Result for quey on KB data.

View file

@ -47,7 +47,7 @@ import qrcode from 'qrcode-terminal';
import express from 'express';
import { GBSSR } from '../../core.gbapp/services/GBSSR.js';
import pkg from 'whatsapp-web.js';
import { DialogKeywords } from 'packages/basic.gblib/services/DialogKeywords.js';
import { DialogKeywords } from '../../basic.gblib/services/DialogKeywords.js';
const { List, Buttons, Client, MessageMedia } = pkg;
/**