Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
0952b9a
updated js runtime to match the latest sdk
chon219 Oct 23, 2020
280788d
updated composerbot of js runtime
chon219 Oct 26, 2020
89c2024
Merge branch 'main' of https://github.com/microsoft/botframework-comp…
chon219 Oct 26, 2020
beedbe0
updated sdk to 4.11.0-rc1
chon219 Oct 29, 2020
3f1cede
Merge branch 'main' of https://github.com/microsoft/botframework-comp…
chon219 Oct 29, 2020
8c52fe0
Merge branch 'main' into zim/update-js-runtime
luhan2017 Oct 30, 2020
3fbaf46
fixed test failure for js runtime
chon219 Oct 30, 2020
9595f07
Merge branch 'main' of https://github.com/microsoft/botframework-comp…
chon219 Oct 30, 2020
4e95867
Merge branch 'zim/update-js-runtime' of https://github.com/microsoft/…
chon219 Oct 30, 2020
7f8792e
Merge branch 'main' into zim/update-js-runtime
luhan2017 Nov 3, 2020
649b550
updated sdk to 4.11 rc3
chon219 Nov 3, 2020
0533e92
Merge branch 'main' of https://github.com/microsoft/botframework-comp…
chon219 Nov 3, 2020
af295a1
Merge branch 'zim/update-js-runtime' of https://github.com/microsoft/…
chon219 Nov 3, 2020
05ac7db
Merge branch 'main' into zim/update-js-runtime
luhan2017 Nov 4, 2020
d20771d
added schemas in node runtime
chon219 Nov 4, 2020
b35328c
copy schemas folder while ejecting
chon219 Nov 4, 2020
357ff56
added sample for custom action
chon219 Nov 4, 2020
4324deb
Merge branch 'main' of https://github.com/microsoft/botframework-comp…
chon219 Nov 4, 2020
a8be9d5
inline comments and converters
chon219 Nov 5, 2020
393eb97
updated update-schema script
chon219 Nov 5, 2020
2460b91
more inline comments
chon219 Nov 5, 2020
0cc31fe
Merge branch 'main' of https://github.com/microsoft/botframework-comp…
chon219 Nov 5, 2020
a85257f
Merge branch 'main' into zim/update-js-runtime
chon219 Nov 5, 2020
d7de7b9
Merge branch 'main' into zim/update-js-runtime
luhan2017 Nov 9, 2020
20138c3
updated js runtime to 4.11.0
chon219 Nov 10, 2020
5a45ca7
Merge branch 'main' of https://github.com/microsoft/botframework-comp…
chon219 Nov 10, 2020
ed8cf93
Merge branch 'main' into zim/update-js-runtime
luhan2017 Nov 12, 2020
b92dafd
Merge branch 'main' into zim/update-js-runtime
luhan2017 Nov 13, 2020
f8a579c
Merge branch 'main' into zim/update-js-runtime
cwhitten Nov 17, 2020
94ddebf
Merge branch 'main' into zim/update-js-runtime
luhan2017 Nov 18, 2020
6a1ecc5
Merge branch 'main' into zim/update-js-runtime
cwhitten Nov 19, 2020
8fdf593
Merge branch 'main' into zim/update-js-runtime
cwhitten Nov 19, 2020
0047308
Merge branch 'main' into zim/update-js-runtime
chon219 Nov 26, 2020
125edff
Merge branch 'main' into zim/update-js-runtime
luhan2017 Nov 30, 2020
f00a423
Merge branch 'main' into zim/update-js-runtime
cwhitten Dec 1, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions runtime/node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@
"license": "ISC",
"dependencies": {
"@azure/functions": "^1.2.2",
"botbuilder": "4.10.0-rc0",
"botbuilder-dialogs": "4.10.0-rc0",
"botbuilder-dialogs-adaptive": "4.10.0-rc0-preview",
"botbuilder-dialogs-declarative": "4.10.0-rc0-preview",
"botbuilder": "next",
"botbuilder-ai": "next",
"botbuilder-dialogs": "next",
"botbuilder-dialogs-adaptive": "next",
"botbuilder-dialogs-declarative": "next",
"debug": "^4.1.1",
"lodash": "^4.17.19",
"minimist": "1.2.5",
Expand Down
24 changes: 16 additions & 8 deletions runtime/node/src/shared/composerBot.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

import { ActivityHandler, ActivityTypes, ConversationState, SkillHttpClient, TurnContext, UserState } from 'botbuilder';
import {
ActivityHandler,
ActivityTypes,
ComponentRegistration,
ConversationState,
SkillHttpClient,
TurnContext,
UserState,
} from 'botbuilder';
import { QnAMakerComponentRegistration, LuisComponentRegistration } from 'botbuilder-ai';
import { DialogManager } from 'botbuilder-dialogs';
import {
AdaptiveComponentRegistration,
AdaptiveDialog,
AdaptiveDialogComponentRegistration,
LanguageGeneratorExtensions,
LanguagePolicy,
ResourceExtensions,
Expand Down Expand Up @@ -41,10 +50,13 @@ export class ComposerBot extends ActivityHandler {
this.projectRoot = getProjectRoot();
this.settings = getSettings(this.projectRoot);

ComponentRegistration.add(new AdaptiveComponentRegistration());
ComponentRegistration.add(new QnAMakerComponentRegistration());
ComponentRegistration.add(new LuisComponentRegistration());

// Create and configure resource explorer.
this.resourceExplorer = new ResourceExplorer();
this.resourceExplorer.addFolders(this.projectRoot, ['runtime'], false);
this.resourceExplorer.addComponent(new AdaptiveDialogComponentRegistration(this.resourceExplorer));

this.loadRootDialog();
this.configureLanguageGeneration();
Expand All @@ -55,9 +67,7 @@ export class ComposerBot extends ActivityHandler {
const rootDialog = this.dialogManager.rootDialog as AdaptiveDialog;
const claimIdentity = turnContext.turnState.get(turnContext.adapter.BotIdentityKey);
if (claimIdentity && SkillValidation.isSkillClaim(claimIdentity.claims)) {
rootDialog.autoEndDialog = true;
} else {
rootDialog.autoEndDialog = false;
rootDialog.configure({ autoEndDialog: true });
}

const removeRecipientMention = (this.settings.feature && this.settings.feature.removeRecipientMention) || false;
Expand All @@ -76,8 +86,6 @@ export class ComposerBot extends ActivityHandler {
this.dialogManager = new DialogManager(rootDialog);
ResourceExtensions.useResourceExplorer(this.dialogManager, this.resourceExplorer);
this.dialogManager.initialTurnState.set('settings', this.settings);
this.dialogManager.conversationState = this.conversationState;
this.dialogManager.userState = this.userState;
}

private configureLanguageGeneration() {
Expand Down
5 changes: 2 additions & 3 deletions runtime/node/src/shared/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,9 @@ import {
SkillHandler,
TurnContext,
UserState,
useBotState,
WebRequest,
WebResponse,
Activity,
StatusCodeError,
StatusCodes,
} from 'botbuilder';
import { AuthenticationConfiguration, SimpleCredentialProvider } from 'botframework-connector';
import { ComposerBot } from './composerBot';
Expand Down Expand Up @@ -122,6 +120,7 @@ export const getBotAdapter = (userState: UserState, conversationState: Conversat
appPassword: settings.MicrosoftAppPassword,
};
const adapter = new BotFrameworkAdapter(adapterSettings);
useBotState(adapter, userState, conversationState);
adapter.onTurnError = async (turnContext: TurnContext, error: Error) => {
try {
// Send a message to the user.
Expand Down