fix(basic.gblib): GBAI automatic retrieval.
This commit is contained in:
parent
04e69b9d99
commit
0ef0fc01f5
5 changed files with 8 additions and 8 deletions
|
@ -1101,7 +1101,7 @@ export class SystemKeywords {
|
||||||
const { min, user, params } = await DialogKeywords.getProcessInfo(pid);
|
const { min, user, params } = await DialogKeywords.getProcessInfo(pid);
|
||||||
let { baseUrl, client } = await GBDeployer.internalGetDriveClient(min);
|
let { baseUrl, client } = await GBDeployer.internalGetDriveClient(min);
|
||||||
const botId = min.instance.botId;
|
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
|
// 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 path = DialogKeywords.getGBAIPath(min.botId,`gbdrive`);
|
||||||
const root = path;
|
const root = path;
|
||||||
const srcPath = urlJoin(root, src);
|
const srcPath = urlJoin(root, src);
|
||||||
const dstPath = urlJoin(path dest);
|
const dstPath = urlJoin(path, dest);
|
||||||
|
|
||||||
// Checks if the destination contains subfolders that
|
// Checks if the destination contains subfolders that
|
||||||
// need to be created.
|
// need to be created.
|
||||||
|
|
|
@ -931,7 +931,7 @@ export class GBMinService {
|
||||||
const folder = `work/${path}/cache`;
|
const folder = `work/${path}/cache`;
|
||||||
const filename = `${GBAdminService.generateUuid()}.png`;
|
const filename = `${GBAdminService.generateUuid()}.png`;
|
||||||
|
|
||||||
Fs.writeFileSync(path.join(folder, filename), data);
|
Fs.writeFileSync(urlJoin(folder, filename), data);
|
||||||
step.context.activity.text = urlJoin(
|
step.context.activity.text = urlJoin(
|
||||||
GBServer.globals.publicAddress,
|
GBServer.globals.publicAddress,
|
||||||
`${min.instance.botId}`,
|
`${min.instance.botId}`,
|
||||||
|
|
|
@ -284,10 +284,10 @@ export class GBSSR {
|
||||||
GBServer.globals.minInstances[0]:
|
GBServer.globals.minInstances[0]:
|
||||||
GBServer.globals.minInstances.filter(p => p.instance.botId === botId)[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) {
|
if (min && req.originalUrl && prerender && exclude) {
|
||||||
const path = Path.join(
|
path = Path.join(
|
||||||
process.env.PWD,
|
process.env.PWD,
|
||||||
'work',
|
'work',
|
||||||
path,
|
path,
|
||||||
|
@ -298,7 +298,7 @@ export class GBSSR {
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
const path = Path.join(
|
path = Path.join(
|
||||||
process.env.PWD,
|
process.env.PWD,
|
||||||
GBDeployer.deployFolder,
|
GBDeployer.deployFolder,
|
||||||
GBMinService.uiPackage,
|
GBMinService.uiPackage,
|
||||||
|
|
|
@ -73,7 +73,7 @@ import { min } from 'lodash';
|
||||||
import { GBAdminService } from '../../admin.gbapp/services/GBAdminService.js';
|
import { GBAdminService } from '../../admin.gbapp/services/GBAdminService.js';
|
||||||
import { text } from 'body-parser';
|
import { text } from 'body-parser';
|
||||||
import { GBVMService } from '../../basic.gblib/services/GBVMService.js';
|
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.
|
* Result for quey on KB data.
|
||||||
|
|
|
@ -47,7 +47,7 @@ import qrcode from 'qrcode-terminal';
|
||||||
import express from 'express';
|
import express from 'express';
|
||||||
import { GBSSR } from '../../core.gbapp/services/GBSSR.js';
|
import { GBSSR } from '../../core.gbapp/services/GBSSR.js';
|
||||||
import pkg from 'whatsapp-web.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;
|
const { List, Buttons, Client, MessageMedia } = pkg;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue