Skip to content

Commit

Permalink
fix(core.gbapp): FIX SSR errors and setOption impersonated.
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigorodriguez committed Jul 26, 2023
1 parent e596f31 commit 7a6d14c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion packages/basic.gblib/services/DialogKeywords.ts
Original file line number Diff line number Diff line change
Expand Up @@ -807,7 +807,7 @@ export class DialogKeywords {
};
min.cbMap[userId] = {};
min.cbMap[userId]['promise'] = '!GBHEAR';

while (min.cbMap[userId].promise === '!GBHEAR') {
await sleep(DEFAULT_HEAR_POLL_INTERVAL);
}
Expand Down
6 changes: 4 additions & 2 deletions packages/core.gbapp/services/GBConversationalService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -875,12 +875,14 @@ export class GBConversationalService {
});
}

return await step.replaceDialog(`/${intent}`, step.activeDialog.state.options);
await step.replaceDialog(`/${intent}`, step.activeDialog.state.options);
return true;

}

GBLog.info(`NLP NOT called: score: ${score} > required (nlpScore): ${instanceScore}`);

return null;
return false;
}

public async getLanguage(min: GBMinInstance, text: string): Promise<string> {
Expand Down
8 changes: 4 additions & 4 deletions packages/kb.gbapp/dialogs/AskDialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ export class AskDialog extends IGBDialog {
await GBVMService.callVM(startDialog.toLowerCase().trim(), min, step, user, this.deployer, false);
}

return step.endDialog();
return await step.endDialog();
}

const locale = step.context.activity.locale;
Expand Down Expand Up @@ -270,9 +270,9 @@ export class AskDialog extends IGBDialog {

// Tries to answer by NLP.

let nextDialog = await min.conversationalService.routeNLP(step, min, text);
if (nextDialog) {
return nextDialog;
let handled = await min.conversationalService.routeNLP(step, min, text);
if (handled) {
return;
}

// Tries to answer by Reading Comprehension.
Expand Down

0 comments on commit 7a6d14c

Please sign in to comment.