fix(all): sendFile working after path fix.
This commit is contained in:
parent
d8c5458a1f
commit
2c901f451b
4 changed files with 16 additions and 10 deletions
3
.vscode/launch.json
vendored
3
.vscode/launch.json
vendored
|
@ -18,8 +18,7 @@
|
|||
"node_modules/**/*.js"
|
||||
],
|
||||
"outFiles": [
|
||||
"${workspaceRoot}/dist/*.js"
|
||||
],
|
||||
"${workspaceRoot}/dist/**/*.js"],
|
||||
"stopOnEntry": false,
|
||||
"console": "integratedTerminal"
|
||||
}
|
||||
|
|
|
@ -95,8 +95,7 @@ class SysClass {
|
|||
await timeout(seconds * 1000);
|
||||
}
|
||||
|
||||
|
||||
public async set(file: string, address:string, value: any): Promise<any> {
|
||||
public async set(file: string, address: string, value: any): Promise<any> {
|
||||
try {
|
||||
let token = await this.min.adminService.acquireElevatedToken(this.min.instance.instanceId);
|
||||
|
||||
|
@ -122,7 +121,7 @@ class SysClass {
|
|||
if (document === undefined) {
|
||||
throw `File '${file}' specified on save GBasic command SET not found. Check the .gbdata or the .gbdialog associated.`;
|
||||
}
|
||||
|
||||
|
||||
let body = { values: [[]] };
|
||||
body.values[0][0] = value;
|
||||
|
||||
|
@ -226,7 +225,7 @@ class SysClass {
|
|||
)
|
||||
.get();
|
||||
|
||||
return results.text[0][0];
|
||||
return results.text[0][0];
|
||||
} catch (error) {
|
||||
GBLog.error(error);
|
||||
}
|
||||
|
@ -441,7 +440,14 @@ export class DialogClass {
|
|||
}
|
||||
|
||||
public async sendFile(step, filename, caption) {
|
||||
let url = urlJoin(GBServer.globals.publicAddress, 'kb', this.min.botId + '.gbkb', 'assets', filename);
|
||||
let url = urlJoin(
|
||||
GBServer.globals.publicAddress,
|
||||
'kb',
|
||||
`${this.min.botId}.gbai`,
|
||||
`${this.min.botId}.gbkb`,
|
||||
'assets',
|
||||
filename
|
||||
);
|
||||
await this.min.conversationalService.sendFile(this.min, step, null, url, caption);
|
||||
}
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
|
||||
'use strict';
|
||||
|
||||
import { MessageFactory, RecognizerResult } from 'botbuilder';
|
||||
import { MessageFactory, RecognizerResult, TurnContext } from 'botbuilder';
|
||||
import { LuisRecognizer } from 'botbuilder-ai';
|
||||
import { GBDialogStep, GBLog, GBMinInstance, IGBCoreService } from 'botlib';
|
||||
import { GBServer } from '../../../src/app';
|
||||
|
@ -517,7 +517,7 @@ export class GBConversationalService {
|
|||
|
||||
try {
|
||||
step.activeDialog.state.otptions.entities = nlp.entities;
|
||||
await step.replaceDialog(`/${intent}`, step.activeDialog.state.options );
|
||||
await step.replaceDialog(`/${intent}`, step.activeDialog.state.options);
|
||||
|
||||
return true;
|
||||
} catch (error) {
|
||||
|
|
|
@ -227,7 +227,8 @@ export class GBMinService {
|
|||
GBServer.globals.minInstances.push(min);
|
||||
|
||||
await this.deployer.deployPackage(min, 'packages/default.gbtheme');
|
||||
|
||||
|
||||
|
||||
// Install per bot deployed packages.
|
||||
|
||||
let packagePath = `work/${min.botId}.gbai/${min.botId}.gbdialog`;
|
||||
|
|
Loading…
Add table
Reference in a new issue