Skip to content

Commit 2b6438d

Browse files
author
mdrichardson
committed
Merge branch 'skills/SkillDialogSamples' of https://github.com/microsoft/botbuilder-samples into skills/SkillDialogSamples
2 parents 090b524 + 4ce1410 commit 2b6438d

File tree

433 files changed

+18944
-45018
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

433 files changed

+18944
-45018
lines changed

MigrationV3V4/CSharp/Skills/V3EchoBot/Microsoft.Bot.Sample.EchoBot.csproj

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,20 +63,24 @@
6363
<Reference Include="Microsoft.Azure.KeyVault.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
6464
<HintPath>..\packages\Microsoft.Azure.KeyVault.Core.1.0.0\lib\net40\Microsoft.Azure.KeyVault.Core.dll</HintPath>
6565
</Reference>
66-
<Reference Include="Microsoft.Bot.Builder, Version=3.30.0.127, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
66+
<Reference Include="Microsoft.Bot.Builder, Version=3.30.0.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
6767
<HintPath>..\packages\Microsoft.Bot.Builder.3.30.0\lib\net46\Microsoft.Bot.Builder.dll</HintPath>
68+
<Private>True</Private>
6869
</Reference>
69-
<Reference Include="Microsoft.Bot.Builder.Autofac, Version=3.30.0.127, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
70+
<Reference Include="Microsoft.Bot.Builder.Autofac, Version=3.30.0.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
7071
<HintPath>..\packages\Microsoft.Bot.Builder.3.30.0\lib\net46\Microsoft.Bot.Builder.Autofac.dll</HintPath>
72+
<Private>True</Private>
7173
</Reference>
7274
<Reference Include="Microsoft.Bot.Builder.Azure, Version=3.16.3.40383, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
7375
<HintPath>..\packages\Microsoft.Bot.Builder.Azure.3.16.3.40383\lib\net46\Microsoft.Bot.Builder.Azure.dll</HintPath>
7476
</Reference>
75-
<Reference Include="Microsoft.Bot.Builder.History, Version=3.30.0.127, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
77+
<Reference Include="Microsoft.Bot.Builder.History, Version=3.30.0.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
7678
<HintPath>..\packages\Microsoft.Bot.Builder.History.3.30.0\lib\net46\Microsoft.Bot.Builder.History.dll</HintPath>
79+
<Private>True</Private>
7780
</Reference>
78-
<Reference Include="Microsoft.Bot.Connector, Version=3.30.0.127, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
81+
<Reference Include="Microsoft.Bot.Connector, Version=3.30.0.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
7982
<HintPath>..\packages\Microsoft.Bot.Connector.3.30.0\lib\net46\Microsoft.Bot.Connector.dll</HintPath>
83+
<Private>True</Private>
8084
</Reference>
8185
<Reference Include="Microsoft.CSharp" />
8286
<Reference Include="Microsoft.Data.Edm, Version=5.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">

MigrationV3V4/CSharp/Skills/V3EchoBot/Web.config

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,23 +84,23 @@
8484
</dependentAssembly>
8585
<dependentAssembly>
8686
<assemblyIdentity name="Microsoft.Bot.Connector" publicKeyToken="31bf3856ad364e35" culture="neutral" />
87-
<bindingRedirect oldVersion="0.0.0.0-3.30.0.127" newVersion="3.30.0.127" />
87+
<bindingRedirect oldVersion="0.0.0.0-3.30.0.1" newVersion="3.30.0.1" />
8888
</dependentAssembly>
8989
<dependentAssembly>
9090
<assemblyIdentity name="Microsoft.Bot.Builder" publicKeyToken="31bf3856ad364e35" culture="neutral" />
91-
<bindingRedirect oldVersion="0.0.0.0-3.30.0.127" newVersion="3.30.0.127" />
91+
<bindingRedirect oldVersion="0.0.0.0-3.30.0.1" newVersion="3.30.0.1" />
9292
</dependentAssembly>
9393
<dependentAssembly>
9494
<assemblyIdentity name="Microsoft.Azure.Documents.Client" publicKeyToken="31bf3856ad364e35" culture="neutral" />
9595
<bindingRedirect oldVersion="0.0.0.0-1.11.0.0" newVersion="1.11.0.0" />
9696
</dependentAssembly>
9797
<dependentAssembly>
9898
<assemblyIdentity name="Microsoft.Bot.Builder.Autofac" publicKeyToken="31bf3856ad364e35" culture="neutral" />
99-
<bindingRedirect oldVersion="0.0.0.0-3.30.0.127" newVersion="3.30.0.127" />
99+
<bindingRedirect oldVersion="0.0.0.0-3.30.0.1" newVersion="3.30.0.1" />
100100
</dependentAssembly>
101101
<dependentAssembly>
102102
<assemblyIdentity name="Microsoft.Bot.Builder.History" publicKeyToken="31bf3856ad364e35" culture="neutral" />
103-
<bindingRedirect oldVersion="0.0.0.0-3.30.0.127" newVersion="3.30.0.127" />
103+
<bindingRedirect oldVersion="0.0.0.0-3.30.0.1" newVersion="3.30.0.1" />
104104
</dependentAssembly>
105105
<dependentAssembly>
106106
<assemblyIdentity name="Microsoft.Data.Services.Client" publicKeyToken="31bf3856ad364e35" culture="neutral" />

MigrationV3V4/CSharp/Skills/V3PizzaBot/Microsoft.Bot.Sample.PizzaBot.csproj

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,20 +63,24 @@
6363
<Reference Include="Microsoft.Azure.KeyVault.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
6464
<HintPath>..\packages\Microsoft.Azure.KeyVault.Core.1.0.0\lib\net40\Microsoft.Azure.KeyVault.Core.dll</HintPath>
6565
</Reference>
66-
<Reference Include="Microsoft.Bot.Builder, Version=3.30.0.127, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
66+
<Reference Include="Microsoft.Bot.Builder, Version=3.30.0.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
6767
<HintPath>..\packages\Microsoft.Bot.Builder.3.30.0\lib\net46\Microsoft.Bot.Builder.dll</HintPath>
68+
<Private>True</Private>
6869
</Reference>
69-
<Reference Include="Microsoft.Bot.Builder.Autofac, Version=3.30.0.127, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
70+
<Reference Include="Microsoft.Bot.Builder.Autofac, Version=3.30.0.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
7071
<HintPath>..\packages\Microsoft.Bot.Builder.3.30.0\lib\net46\Microsoft.Bot.Builder.Autofac.dll</HintPath>
72+
<Private>True</Private>
7173
</Reference>
7274
<Reference Include="Microsoft.Bot.Builder.Azure, Version=3.16.3.40383, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
7375
<HintPath>..\packages\Microsoft.Bot.Builder.Azure.3.16.3.40383\lib\net46\Microsoft.Bot.Builder.Azure.dll</HintPath>
7476
</Reference>
75-
<Reference Include="Microsoft.Bot.Builder.History, Version=3.30.0.127, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
77+
<Reference Include="Microsoft.Bot.Builder.History, Version=3.30.0.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
7678
<HintPath>..\packages\Microsoft.Bot.Builder.History.3.30.0\lib\net46\Microsoft.Bot.Builder.History.dll</HintPath>
79+
<Private>True</Private>
7780
</Reference>
78-
<Reference Include="Microsoft.Bot.Connector, Version=3.30.0.127, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
81+
<Reference Include="Microsoft.Bot.Connector, Version=3.30.0.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
7982
<HintPath>..\packages\Microsoft.Bot.Connector.3.30.0\lib\net46\Microsoft.Bot.Connector.dll</HintPath>
83+
<Private>True</Private>
8084
</Reference>
8185
<Reference Include="Microsoft.CSharp" />
8286
<Reference Include="Microsoft.Data.Edm, Version=5.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">

MigrationV3V4/CSharp/Skills/V3PizzaBot/Web.config

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,23 +84,23 @@
8484
</dependentAssembly>
8585
<dependentAssembly>
8686
<assemblyIdentity name="Microsoft.Bot.Connector" publicKeyToken="31bf3856ad364e35" culture="neutral" />
87-
<bindingRedirect oldVersion="0.0.0.0-3.30.0.127" newVersion="3.30.0.127" />
87+
<bindingRedirect oldVersion="0.0.0.0-3.30.0.1" newVersion="3.30.0.1" />
8888
</dependentAssembly>
8989
<dependentAssembly>
9090
<assemblyIdentity name="Microsoft.Bot.Builder" publicKeyToken="31bf3856ad364e35" culture="neutral" />
91-
<bindingRedirect oldVersion="0.0.0.0-3.30.0.127" newVersion="3.30.0.127" />
91+
<bindingRedirect oldVersion="0.0.0.0-3.30.0.1" newVersion="3.30.0.1" />
9292
</dependentAssembly>
9393
<dependentAssembly>
9494
<assemblyIdentity name="Microsoft.Azure.Documents.Client" publicKeyToken="31bf3856ad364e35" culture="neutral" />
9595
<bindingRedirect oldVersion="0.0.0.0-1.11.0.0" newVersion="1.11.0.0" />
9696
</dependentAssembly>
9797
<dependentAssembly>
9898
<assemblyIdentity name="Microsoft.Bot.Builder.Autofac" publicKeyToken="31bf3856ad364e35" culture="neutral" />
99-
<bindingRedirect oldVersion="0.0.0.0-3.30.0.127" newVersion="3.30.0.127" />
99+
<bindingRedirect oldVersion="0.0.0.0-3.30.0.1" newVersion="3.30.0.1" />
100100
</dependentAssembly>
101101
<dependentAssembly>
102102
<assemblyIdentity name="Microsoft.Bot.Builder.History" publicKeyToken="31bf3856ad364e35" culture="neutral" />
103-
<bindingRedirect oldVersion="0.0.0.0-3.30.0.127" newVersion="3.30.0.127" />
103+
<bindingRedirect oldVersion="0.0.0.0-3.30.0.1" newVersion="3.30.0.1" />
104104
</dependentAssembly>
105105
<dependentAssembly>
106106
<assemblyIdentity name="Microsoft.Data.Services.Client" publicKeyToken="31bf3856ad364e35" culture="neutral" />

MigrationV3V4/CSharp/Skills/V3SimpleSandwichBot/Microsoft.Bot.Sample.SimpleSandwichBot.csproj

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,20 +63,24 @@
6363
<Reference Include="Microsoft.Azure.KeyVault.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
6464
<HintPath>..\packages\Microsoft.Azure.KeyVault.Core.1.0.0\lib\net40\Microsoft.Azure.KeyVault.Core.dll</HintPath>
6565
</Reference>
66-
<Reference Include="Microsoft.Bot.Builder, Version=3.30.0.127, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
66+
<Reference Include="Microsoft.Bot.Builder, Version=3.30.0.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
6767
<HintPath>..\packages\Microsoft.Bot.Builder.3.30.0\lib\net46\Microsoft.Bot.Builder.dll</HintPath>
68+
<Private>True</Private>
6869
</Reference>
69-
<Reference Include="Microsoft.Bot.Builder.Autofac, Version=3.30.0.127, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
70+
<Reference Include="Microsoft.Bot.Builder.Autofac, Version=3.30.0.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
7071
<HintPath>..\packages\Microsoft.Bot.Builder.3.30.0\lib\net46\Microsoft.Bot.Builder.Autofac.dll</HintPath>
72+
<Private>True</Private>
7173
</Reference>
7274
<Reference Include="Microsoft.Bot.Builder.Azure, Version=3.16.3.40383, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
7375
<HintPath>..\packages\Microsoft.Bot.Builder.Azure.3.16.3.40383\lib\net46\Microsoft.Bot.Builder.Azure.dll</HintPath>
7476
</Reference>
75-
<Reference Include="Microsoft.Bot.Builder.History, Version=3.30.0.127, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
77+
<Reference Include="Microsoft.Bot.Builder.History, Version=3.30.0.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
7678
<HintPath>..\packages\Microsoft.Bot.Builder.History.3.30.0\lib\net46\Microsoft.Bot.Builder.History.dll</HintPath>
79+
<Private>True</Private>
7780
</Reference>
78-
<Reference Include="Microsoft.Bot.Connector, Version=3.30.0.127, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
81+
<Reference Include="Microsoft.Bot.Connector, Version=3.30.0.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
7982
<HintPath>..\packages\Microsoft.Bot.Connector.3.30.0\lib\net46\Microsoft.Bot.Connector.dll</HintPath>
83+
<Private>True</Private>
8084
</Reference>
8185
<Reference Include="Microsoft.CSharp" />
8286
<Reference Include="Microsoft.Data.Edm, Version=5.7.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">

MigrationV3V4/CSharp/Skills/V3SimpleSandwichBot/Web.config

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,23 +84,23 @@
8484
</dependentAssembly>
8585
<dependentAssembly>
8686
<assemblyIdentity name="Microsoft.Bot.Connector" publicKeyToken="31bf3856ad364e35" culture="neutral" />
87-
<bindingRedirect oldVersion="0.0.0.0-3.30.0.127" newVersion="3.30.0.127" />
87+
<bindingRedirect oldVersion="0.0.0.0-3.30.0.1" newVersion="3.30.0.1" />
8888
</dependentAssembly>
8989
<dependentAssembly>
9090
<assemblyIdentity name="Microsoft.Bot.Builder" publicKeyToken="31bf3856ad364e35" culture="neutral" />
91-
<bindingRedirect oldVersion="0.0.0.0-3.30.0.127" newVersion="3.30.0.127" />
91+
<bindingRedirect oldVersion="0.0.0.0-3.30.0.1" newVersion="3.30.0.1" />
9292
</dependentAssembly>
9393
<dependentAssembly>
9494
<assemblyIdentity name="Microsoft.Azure.Documents.Client" publicKeyToken="31bf3856ad364e35" culture="neutral" />
9595
<bindingRedirect oldVersion="0.0.0.0-1.11.0.0" newVersion="1.11.0.0" />
9696
</dependentAssembly>
9797
<dependentAssembly>
9898
<assemblyIdentity name="Microsoft.Bot.Builder.Autofac" publicKeyToken="31bf3856ad364e35" culture="neutral" />
99-
<bindingRedirect oldVersion="0.0.0.0-3.30.0.127" newVersion="3.30.0.127" />
99+
<bindingRedirect oldVersion="0.0.0.0-3.30.0.1" newVersion="3.30.0.1" />
100100
</dependentAssembly>
101101
<dependentAssembly>
102102
<assemblyIdentity name="Microsoft.Bot.Builder.History" publicKeyToken="31bf3856ad364e35" culture="neutral" />
103-
<bindingRedirect oldVersion="0.0.0.0-3.30.0.127" newVersion="3.30.0.127" />
103+
<bindingRedirect oldVersion="0.0.0.0-3.30.0.1" newVersion="3.30.0.1" />
104104
</dependentAssembly>
105105
<dependentAssembly>
106106
<assemblyIdentity name="Microsoft.Data.Services.Client" publicKeyToken="31bf3856ad364e35" culture="neutral" />

MigrationV3V4/CSharp/Skills/V4SimpleRootBot/SimpleRootBot.csproj

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,8 @@
1313
</PropertyGroup>
1414

1515
<ItemGroup>
16-
<PackageReference Include="Microsoft.AspNetCore.App" />
1716
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="3.1.1" />
18-
<PackageReference Include="Microsoft.Bot.Builder.Integration.AspNet.Core" Version="4.8.0-preview-200215-106302" />
17+
<PackageReference Include="Microsoft.Bot.Builder.Integration.AspNet.Core" Version="4.8.0" />
1918
</ItemGroup>
2019

2120
<ItemGroup>
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
MicrosoftAppId=
22
MicrosoftAppPassword=
3-
SkillHostEndpoint=
3+
SkillHostEndpoint=http://localhost:3978/api/skills
44

55
SkillSimpleId=v3-skill-bot
66
SkillSimpleAppId=
77
SkillSimpleEndpoint=http://localhost:3979/api/messages
88

99
SkillBookingId=v3-booking-bot-skill
1010
SkillBookingAppId=
11-
SkillBookingEndpoint=http://localhost:3979/api/messages
11+
SkillBookingEndpoint=http://localhost:3980/api/messages

MigrationV3V4/Node/Skills/v4-root-bot/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
"url": "https://github.com"
1717
},
1818
"dependencies": {
19-
"botbuilder": "^4.7.2",
20-
"botframework-connector": "~4.7.2",
19+
"botbuilder": "^4.8.0",
20+
"botframework-connector": "^4.8.0",
2121
"dotenv": "^8.2.0",
2222
"restify": "~8.4.0"
2323
},

MigrationV3V4/Node/Skills/v4-root-bot/rootBot.js

Lines changed: 19 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -65,32 +65,29 @@ class RootBot extends ActivityHandler {
6565
await next();
6666
});
6767

68-
this.onUnrecognizedActivityType(async (context, next) => {
69-
// Handle EndOfConversation returned by the skill.
70-
if (context.activity.type === ActivityTypes.EndOfConversation) {
71-
// Stop forwarding activities to Skill.
72-
await this.activeSkillProperty.set(context, undefined);
73-
74-
// Show status message, text and value returned by the skill
75-
let eocActivityMessage = `Received ${ ActivityTypes.EndOfConversation }.\n\nCode: ${ context.activity.code }`;
76-
if (context.activity.text) {
77-
eocActivityMessage += `\n\nText: ${ context.activity.text }`;
78-
}
68+
this.onEndOfConversation(async (context, next) => {
69+
// Stop forwarding activities to Skill.
70+
await this.activeSkillProperty.set(context, undefined);
71+
72+
// Show status message, text and value returned by the skill
73+
let eocActivityMessage = `Received ${ ActivityTypes.EndOfConversation }.\n\nCode: ${ context.activity.code }`;
74+
if (context.activity.text) {
75+
eocActivityMessage += `\n\nText: ${ context.activity.text }`;
76+
}
7977

80-
if (context.activity.value) {
81-
eocActivityMessage += `\n\nValue: ${ JSON.stringify(context.activity.value) }`;
82-
}
78+
if (context.activity.value) {
79+
eocActivityMessage += `\n\nValue: ${ JSON.stringify(context.activity.value) }`;
80+
}
8381

84-
await context.sendActivity(eocActivityMessage);
82+
await context.sendActivity(eocActivityMessage);
8583

86-
// We are back at the root
87-
const card = this.getOptionsCard();
88-
const message = MessageFactory.attachment(card);
89-
await context.sendActivity(message);
84+
// We are back at the root
85+
const card = this.getOptionsCard();
86+
const message = MessageFactory.attachment(card);
87+
await context.sendActivity(message);
9088

91-
// Save conversation state
92-
await this.conversationState.saveChanges(context, true);
93-
}
89+
// Save conversation state
90+
await this.conversationState.saveChanges(context, true);
9491

9592
// By calling next() you ensure that the next BotHandler is run.
9693
await next();

0 commit comments

Comments
 (0)