Skip to content

Commit

Permalink
Update packages to botbuilder-dotnet master 4.6.0-preview-191012 and …
Browse files Browse the repository at this point in the history
…update all the samples (microsoft#920)

* PackageUpdate

* Update package to 0925

* Update package to 928

* Update package to 4.Future: 4.6.0-Daily-2019-10-10-01

* Update schema and Templates

* Update sdk.schema

* update code to align with schema change

* Remove createdAt and updatedAt in all the samples

* fix cards sample

* Update packages to botbuilder-dotnet master 4.6.0-preview-191012

* DialogFactory refactor (microsoft#1033)

* WIP

* More WIP

* Refactor dialog generation code into shared-menus

* Replace server side dialogTemplate.json

* Fix test

* WIP

* Merge from master

* Adds tests

* Change shared-menus to shared

* Revert schema changes

* Cleanup

* fix samples (microsoft#1066)

* Removes sandwich bot (microsoft#1086)

* Removes sandwich bot

* fix lint error

* enable eslint security rules (microsoft#1084)

* do not use dangerous inner html in react

* consolidate eslint dependencies to root

* fix lint errors

* remove sample-json-editor

* consolidate eslint packages and bump ts version

* update client for new ts-eslint rules

* apply lint changes to obiformeditor

* apply new lint rules to visual editor

* apply new lint rules to shared-menus

* apply new lint rules to server

* apply ts fixes

* add temp fix for adding new files

* fix merge build / lint issues

* enable eslint security rules

* fix lint error after merge

* remove recognizer options from choice input form (microsoft#1087)

* Updates to interruption sample (microsoft#1025)

* Fixes microsoft#950 microsoft#949

* Updates to validation

* Fix Luis republish issue when settings change but luis files not change (microsoft#1072)

* fix republish issue and fix code mirror settings update bug

* polish

* fix comments

* polish

* fix comments

* fix comments in another way

* fix issue (microsoft#1102)

* Add shortcuts for undo / redo (microsoft#1071)

* short cut for copy paste undo redo

* refactor keyboardZone & close copy&paste shortcut

* revert changes in 'KeyboardZone'

* revert some unnecessary changes

* rename undo/remo event type

* fix keyboard navigation after switching tabs or apps (microsoft#1075)

* rewrite the keyboard zone event listener

* change Props interface name, expose native key event

* use includes instead of find

* update pr template to reference GH references (microsoft#1104)

* fix bug: show recent bot project (microsoft#1103)

* remove designer timestamps from samples

* fix

* Fixed steps sample bugs

* Fix Input_Samples

* fix todo test

* fix todo bug

* fix tests

* update SDKTypes and labelMap

also fix some random schema typos

* Some minor fixes

* add "\r\n" to fix the CI test failure

* Try to use Environment.NewLine to fix test case

* Fix testcases by using Environment.NewLine

* Update ToDoBotTests.cs

* Add QnA Sample

* [Form editor] Update shared schema (microsoft#1123)

* add ActivityTemplate

* update adaptive dialog

* EntityRecognizer -> EntityRecognizers

* extract $ fields  to sharable function

* update id property

* input updates

* update BeginDialog

* update CancelAllDialogs

* update ChoiceInput

* add ConditionalSelector

* update ConfirmInput

* update DateTimeInput

* update DebugBreak

* remove extraneous fields

* update DeleteProperty

* update EditActions

* update EditArray

* update EmitEvent

* update EndDialog

* update EndTurn

* add FirstSelector

* update Foreach

* update ForeachPage

* update HTTPRequest

* update IActivityTemplate

* update IDialog

* update interfaces

* update IfCondition

* update InitProperty

* update LanguagePolicy

* update LogAction

* Update LuisRecognizer

* add MostSpecificSelector MultiLanguageRecognizer

* update NumberInput

* update OAuthInput

* update Trigger Conditions

* update QnAMakerDialog

* update regex types

* update RepeatDialog

* update ReplaceDialog

* update SendActivity

* update SetProperty

* add StaticActivityTemplate

* update SwitchCondition

* update TextInput

* add TextTemplate

* update TraceActivity

* add TrueSelector

* update events -> triggers

* move SDKTypes to own file

avoids circular reference runtime errors

* add to triggers instead of events when creating new trigger

* update visual editor to reference triggers and OnCustomEvent

* remove value from prompt form

* update editor schema

* fix navigating to actions from form

* memoize form change handler

* show dialog events in trigger creation

* remove leftover anyOf

* fix trigger event creation

* update uiSchema

* fix HttpRequest headers schema

* improve obischema type

* fix dialog options name

fixes microsoft#1053

* fix tests

* Update Dialog validation rules

* Fix to some SampleBots

* Fix tests
  • Loading branch information
luhan2017 authored and cwhitten committed Oct 16, 2019
1 parent 751fe68 commit 0227580
Show file tree
Hide file tree
Showing 135 changed files with 5,396 additions and 8,916 deletions.
13 changes: 8 additions & 5 deletions BotProject/CSharp/BotManager.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
using Microsoft.Bot.Builder.BotFramework;
using Microsoft.Bot.Builder.Dialogs;
using Microsoft.Bot.Builder.Dialogs.Adaptive;
using Microsoft.Bot.Builder.Dialogs.Debugging;
using Microsoft.Bot.Builder.Dialogs.Declarative;
using Microsoft.Bot.Builder.Dialogs.Declarative.Resources;
using Microsoft.Bot.Builder.Integration.AspNet.Core;
using Microsoft.Bot.Connector.Authentication;
using Microsoft.Extensions.Configuration;
using Microsoft.Bot.Builder.LanguageGeneration;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System;
Expand Down Expand Up @@ -69,10 +71,11 @@ public void SetCurrent(string botDir)
adapter
.UseStorage(storage)
.UseState(userState, conversationState)
.UseLanguageGeneration(resourceExplorer)
.UseDebugger(4712)
.Use(new InspectionMiddleware(inspectionState, userState, conversationState, credentials))
.UseResourceExplorer(resourceExplorer);
.UseAdaptiveDialogs()
.UseResourceExplorer(resourceExplorer)
.UseLanguageGeneration(resourceExplorer, "common.lg")
.Use(new RegisterClassMiddleware<IConfiguration>(Config))
.Use(new InspectionMiddleware(inspectionState, userState, conversationState, credentials));

adapter.OnTurnError = async (turnContext, exception) =>
{
Expand All @@ -83,7 +86,7 @@ public void SetCurrent(string botDir)
};
CurrentAdapter = adapter;

CurrentBot = new ComposerBot("Main.dialog", conversationState, userState, resourceExplorer, DebugSupport.SourceRegistry);
CurrentBot = new ComposerBot("Main.dialog", conversationState, userState, resourceExplorer, DebugSupport.SourceMap);
}

public void SetCurrent(Stream fileStream, string endpointKey = null, string appPwd = null)
Expand Down
14 changes: 7 additions & 7 deletions BotProject/CSharp/BotProject.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.1.1" />
<PackageReference Include="Microsoft.Bot.Builder" Version="4.6.0-Daily-2019-08-31-01" />
<PackageReference Include="Microsoft.Bot.Builder.Dialogs.Adaptive" Version="4.6.0-Daily-2019-08-31-01" />
<PackageReference Include="Microsoft.Bot.Builder.Dialogs.Debugging" Version="4.6.0-Daily-2019-08-31-01" />
<PackageReference Include="Microsoft.Bot.Builder.Dialogs.Declarative" Version="4.6.0-Daily-2019-08-31-01" />
<PackageReference Include="Microsoft.Bot.Builder.Integration.AspNet.Core" Version="4.6.0-Daily-2019-08-31-01" />
<PackageReference Include="Microsoft.Bot.Builder.LanguageGeneration.Renderer" Version="4.6.0-Daily-2019-08-31-01" />
<PackageReference Include="Microsoft.Bot.Connector" Version="4.6.0-Daily-2019-08-31-01" />
<PackageReference Include="Microsoft.Bot.Builder" Version="4.6.0-preview-191012-1" />
<PackageReference Include="Microsoft.Bot.Builder.Dialogs" Version="4.6.0-preview-191012-1" />
<PackageReference Include="Microsoft.Bot.Builder.Dialogs.Adaptive" Version="4.6.0-preview-191012-1" />
<PackageReference Include="Microsoft.Bot.Builder.Dialogs.Debugging" Version="4.6.0-preview-191012-1" />
<PackageReference Include="Microsoft.Bot.Builder.Dialogs.Declarative" Version="4.6.0-preview-191012-1" />
<PackageReference Include="Microsoft.Bot.Builder.Integration.AspNet.Core" Version="4.6.0-preview-191012-1" />
<PackageReference Include="Microsoft.Bot.Connector" Version="4.6.0-preview-191012-1" />
<PackageReference Include="MSTest.TestFramework" Version="1.4.0" />
</ItemGroup>

Expand Down
16 changes: 9 additions & 7 deletions BotProject/CSharp/ComposerBot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,13 @@
using Microsoft.Bot.Builder.Dialogs.Debugging;
using Microsoft.Bot.Builder.Dialogs.Declarative;
using Microsoft.Bot.Builder.Dialogs.Declarative.Resources;
using Microsoft.Bot.Builder.Dialogs.Debugging;
using Microsoft.Bot.Builder.LanguageGeneration;
using Microsoft.Bot.Schema;
using Microsoft.Extensions.Configuration;
using Microsoft.Recognizers.Text;
using Newtonsoft.Json;

using Microsoft.Bot.Builder.AI.QnA;

namespace Microsoft.Bot.Builder.ComposerBot.json
{
Expand All @@ -28,33 +30,33 @@ public class ComposerBot : ActivityHandler
private DialogManager dialogManager;
private ConversationState conversationState;
private IStatePropertyAccessor<DialogState> dialogState;
private Source.IRegistry registry;
private ISourceMap sourceMap;
private string rootDialogFile { get; set; }

public ComposerBot(string rootDialogFile, ConversationState conversationState, UserState userState, ResourceExplorer resourceExplorer, Source.IRegistry registry)
public ComposerBot(string rootDialogFile, ConversationState conversationState, UserState userState, ResourceExplorer resourceExplorer, ISourceMap sourceMap)
{
this.conversationState = conversationState;
this.userState = userState;
this.dialogState = conversationState.CreateProperty<DialogState>("DialogState");
this.registry = registry;
this.sourceMap = sourceMap;
this.resourceExplorer = resourceExplorer;
this.rootDialogFile = rootDialogFile;
DeclarativeTypeLoader.AddComponent(new QnAMakerComponentRegistration());
// auto reload dialogs when file changes
this.resourceExplorer.Changed += (resources) =>
{
if (resources.Any(resource => resource.Id == ".dialog"))
{
Task.Run(() => this.LoadRootDialogAsync());
}
};

};
LoadRootDialogAsync();
}

private void LoadRootDialogAsync()
{
var rootFile = resourceExplorer.GetResource(rootDialogFile);
rootDialog = DeclarativeTypeLoader.Load<AdaptiveDialog>(rootFile, resourceExplorer, registry);
rootDialog = DeclarativeTypeLoader.Load<AdaptiveDialog>(rootFile, resourceExplorer, sourceMap);
this.dialogManager = new DialogManager(rootDialog);
}

Expand Down
2 changes: 1 addition & 1 deletion BotProject/CSharp/NuGet.Config
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
<configuration>
<packageSources>
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
<add key="BotBuilder.myget.org" value="https://botbuilder.myget.org/F/botbuilder-declarative/api/v3/index.json" protocolVersion="3" />
<add key="BotBuilder.myget.org" value="https://botbuilder.myget.org/F/botbuilder-v4-dotnet-daily/api/v3/index.json" protocolVersion="3" />
</packageSources>
</configuration>
Loading

0 comments on commit 0227580

Please sign in to comment.