fix(all): Fix answers with dialog id working again.
This commit is contained in:
parent
a9256d8ecb
commit
ec172b0554
3 changed files with 10 additions and 1 deletions
|
@ -37,6 +37,7 @@ import { GBServer } from '../../../src/app.js';
|
|||
import Fs from 'fs';
|
||||
import SwaggerClient from 'swagger-client';
|
||||
import { spawn } from 'child_process';
|
||||
import { CodeServices } from '../../gpt.gblib/services/CodeServices.js';
|
||||
|
||||
/**
|
||||
* Web Automation services of conversation to be called by BASIC.
|
||||
|
@ -138,6 +139,11 @@ export class DebuggerService {
|
|||
GBServer.globals.debuggers[botId].breaks.push(Number.parseInt(line));
|
||||
}
|
||||
|
||||
public async refactor({ botId, code, change }) {
|
||||
const service = new CodeServices();
|
||||
return await service.refactor(code, change);
|
||||
}
|
||||
|
||||
public async resume({ botId }) {
|
||||
if (GBServer.globals.debuggers[botId].state === 2) {
|
||||
const client = GBServer.globals.debuggers[botId].client;
|
||||
|
|
|
@ -36,7 +36,7 @@ import { GBSSR }from '../../core.gbapp/services/GBSSR.js';
|
|||
|
||||
export class CodeServices {
|
||||
|
||||
public static async refactor (code, whatToDo) {
|
||||
public async refactor (code, whatToDo) {
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -337,6 +337,9 @@ export class AskDialog extends IGBDialog {
|
|||
const mainName = GBVMService.getMethodNameFromVBSFilename(text);
|
||||
await step.endDialog();
|
||||
return await GBVMService.callVM(mainName, min, step, user, this.deployer, false);
|
||||
}
|
||||
else if (text.startsWith('/')) {
|
||||
return await step.replaceDialog(text, { answer: answer });
|
||||
} else {
|
||||
await service.sendAnswer(min, AskDialog.getChannel(step), step, answer);
|
||||
return await step.replaceDialog('/ask', { isReturning: true });
|
||||
|
|
Loading…
Add table
Reference in a new issue