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"
|
"node_modules/**/*.js"
|
||||||
],
|
],
|
||||||
"outFiles": [
|
"outFiles": [
|
||||||
"${workspaceRoot}/dist/*.js"
|
"${workspaceRoot}/dist/**/*.js"],
|
||||||
],
|
|
||||||
"stopOnEntry": false,
|
"stopOnEntry": false,
|
||||||
"console": "integratedTerminal"
|
"console": "integratedTerminal"
|
||||||
}
|
}
|
||||||
|
|
|
@ -95,8 +95,7 @@ class SysClass {
|
||||||
await timeout(seconds * 1000);
|
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 {
|
try {
|
||||||
let token = await this.min.adminService.acquireElevatedToken(this.min.instance.instanceId);
|
let token = await this.min.adminService.acquireElevatedToken(this.min.instance.instanceId);
|
||||||
|
|
||||||
|
@ -441,7 +440,14 @@ export class DialogClass {
|
||||||
}
|
}
|
||||||
|
|
||||||
public async sendFile(step, filename, caption) {
|
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);
|
await this.min.conversationalService.sendFile(this.min, step, null, url, caption);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
import { MessageFactory, RecognizerResult } from 'botbuilder';
|
import { MessageFactory, RecognizerResult, TurnContext } from 'botbuilder';
|
||||||
import { LuisRecognizer } from 'botbuilder-ai';
|
import { LuisRecognizer } from 'botbuilder-ai';
|
||||||
import { GBDialogStep, GBLog, GBMinInstance, IGBCoreService } from 'botlib';
|
import { GBDialogStep, GBLog, GBMinInstance, IGBCoreService } from 'botlib';
|
||||||
import { GBServer } from '../../../src/app';
|
import { GBServer } from '../../../src/app';
|
||||||
|
@ -517,7 +517,7 @@ export class GBConversationalService {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
step.activeDialog.state.otptions.entities = nlp.entities;
|
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;
|
return true;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|
|
@ -228,6 +228,7 @@ export class GBMinService {
|
||||||
|
|
||||||
await this.deployer.deployPackage(min, 'packages/default.gbtheme');
|
await this.deployer.deployPackage(min, 'packages/default.gbtheme');
|
||||||
|
|
||||||
|
|
||||||
// Install per bot deployed packages.
|
// Install per bot deployed packages.
|
||||||
|
|
||||||
let packagePath = `work/${min.botId}.gbai/${min.botId}.gbdialog`;
|
let packagePath = `work/${min.botId}.gbai/${min.botId}.gbdialog`;
|
||||||
|
|
Loading…
Add table
Reference in a new issue