Skip to content

Commit

Permalink
fix(all): Fix answers with dialog id working again.
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigorodriguez committed Jul 25, 2023
1 parent a9256d8 commit ec172b0
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
6 changes: 6 additions & 0 deletions packages/basic.gblib/services/DebuggerService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion packages/gpt.gblib/services/CodeServices.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
}

}
3 changes: 3 additions & 0 deletions packages/kb.gbapp/dialogs/AskDialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 });
Expand Down

0 comments on commit ec172b0

Please sign in to comment.