Skip to content

Commit

Permalink
Stevenic/update master (#2214)
Browse files Browse the repository at this point in the history
* Add Dialog / PageView telemetry (#2145)

* Update app insights package version

* Add PageView logging

* move TelemetryView helper to botTelemetryClient.ts

* remove telemetry Extensions class, harden helper method, add tests

Co-authored-by: Steven Gum <14935595+stevengum@users.noreply.github.com>

* move botbuilder-lg and adaptive-expressions out of preview (#2190)

* move botbuilder-lg and adaptive-expressions out of preview

* correct set-version script in preview packages

* restore preview packages to using Version instead of PreviewPackageVersion

* Fixed issues with AdaptiveSkillDialog (#2196)

and added unit tests

* [Cherry-pick] timex and formatX functions (#2200)

* [PORT] [Expression] Add more timex builtin functions (#2187)

* add more timex function

* fix typo

* fix typo

* Add formatNumber, parseEpoch and parseTicks. (#2198)

* Add formatNumber, parseEpoch and parseTicks.

* Switch to ESNext like other packages.
Switch ticks to bigInt.
Add tests.

Co-authored-by: Shuai Wang <shuwan@microsoft.com>

Co-authored-by: Hongyang Du (hond) <hond@microsoft.com>
Co-authored-by: Chris McConnell <chrimc@microsoft.com>
Co-authored-by: Shuai Wang <shuwan@microsoft.com>

* Updated packages to target ES6 (#2204)

* Switch adaptive-expressions to es6 (#2205)

* Drop back to es5 and add bigint support.

* Fix test script.

* Fix test script.

* Remove adaptive.

* Remove space.

* Remove changes to package.json.

* update adaptive-expressions target to es5 for initial testing

* Push es5.

Co-authored-by: stevengum <14935595+stevengum@users.noreply.github.com>

* Renamed AdaptiveSkillDialog to BeginSkillDialog (#2212)

* Renamed BeginSkill action again (#2215)

* Renamed BeginSkill action again

* update component registration

Co-authored-by: Gary Pretty <gary@garypretty.co.uk>
Co-authored-by: Steven Gum <14935595+stevengum@users.noreply.github.com>
Co-authored-by: Dong Lei <donglei@microsoft.com>
Co-authored-by: Hongyang Du (hond) <hond@microsoft.com>
Co-authored-by: Chris McConnell <chrimc@microsoft.com>
Co-authored-by: Shuai Wang <shuwan@microsoft.com>
  • Loading branch information
7 people committed May 8, 2020
1 parent 8ad017c commit 001ecb5
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 19 deletions.
Expand Up @@ -13,7 +13,7 @@ import { Activity, ActivityTypes, BotFrameworkClient, SkillConversationIdFactory
const SKILL_CLIENT = Symbol('skillClient');
const CONVERSATION_ID_FACTORY = Symbol('conversationIdFactory');

export class AdaptiveSkillDialog extends SkillDialog {
export class BeginSkill extends SkillDialog {

/**
* Optional expression which if is true will disable this action.
Expand Down Expand Up @@ -71,7 +71,7 @@ export class AdaptiveSkillDialog extends SkillDialog {
public connectionName: StringExpression;

/**
* Creates a new `AdaptiveSkillDialog instance.
* Creates a new `BeginSkillDialog instance.
* @param options Optional options used to configure the skill dialog.
*/
constructor(options?: SkillDialogOptions) {
Expand Down
1 change: 1 addition & 0 deletions libraries/botbuilder-dialogs-adaptive/src/actions/index.ts
Expand Up @@ -8,6 +8,7 @@
export * from './actionScope';
export * from './baseInvokeDialog';
export * from './beginDialog';
export * from './beginSkill';
export * from './breakLoop';
export * from './cancelAllDialogs';
export * from './case';
Expand Down
Expand Up @@ -10,7 +10,7 @@ import { ComponentRegistration, ResourceExplorer, TypeBuilder, BuilderRegistrati
import { Choice, ListStyle, ChoiceFactoryOptions, FindChoicesOptions } from 'botbuilder-dialogs';
import { AdaptiveTypeBuilder } from './adaptiveTypeBuilder';
import { AdaptiveDialog } from './adaptiveDialog';
import { BeginDialog, BreakLoop, CancelAllDialogs, ContinueLoop, DeleteActivity, DeleteProperties, DeleteProperty, EditActions, EditArray, EmitEvent, EndDialog, EndTurn, ForEach, ForEachPage, GetActivityMembers, GetConversationMembers, GotoAction, IfCondition, LogAction, RepeatDialog, ReplaceDialog, SendActivity, SetProperties, SetProperty, SignOutUser, SwitchCondition, TraceActivity, UpdateActivity, ArrayChangeType, PropertyAssignmentConverter } from './actions';
import { BeginDialog, BeginSkill, BreakLoop, CancelAllDialogs, ContinueLoop, DeleteActivity, DeleteProperties, DeleteProperty, EditActions, EditArray, EmitEvent, EndDialog, EndTurn, ForEach, ForEachPage, GetActivityMembers, GetConversationMembers, GotoAction, IfCondition, LogAction, RepeatDialog, ReplaceDialog, SendActivity, SetProperties, SetProperty, SignOutUser, SwitchCondition, TraceActivity, UpdateActivity, ArrayChangeType, PropertyAssignmentConverter } from './actions';
import { AttachmentInput, ChoiceInput, ConfirmInput, DateTimeInput, NumberInput, OAuthInput, TextInput, AttachmentOutputFormat, ChoiceOutputFormat } from './input';
import { OnActivity, OnAssignEntity, OnBeginDialog, OnCancelDialog, OnChooseEntity, OnChooseIntent, OnChooseProperty, OnClearProperty, OnCondition, OnConversationUpdateActivity, OnCustomEvent, OnDialogEvent, OnEndOfActions, OnEndOfConversationActivity, OnError, OnEventActivity, OnHandoffActivity, OnIntent, OnInvokeActivity, OnMessageActivity, OnMessageDeleteActivity, OnMessageReactionActivity, OnMessageUpdateActivity, OnQnAMatch, OnRepromptDialog, OnTypingActivity, OnUnknownIntent } from './conditions';
import { CrossTrainedRecognizerSet, MultiLanguageRecognizer, RecognizerSet, ValueRecognizer, RegexRecognizer, IntentPatternConverter } from './recognizers';
Expand All @@ -24,7 +24,6 @@ import { TemplateEngineLanguageGenerator, ResourceMultiLanguageGenerator } from
import { ConditionalSelector, FirstSelector, RandomSelector, TrueSelector } from './selectors';
import { LanguageGeneratorConverter } from './converters/languageGeneratorConverter';
import { LuisAdaptiveRecognizer } from './luis';
import { AdaptiveSkillDialog } from './skills/adaptiveSkillDialog';

export class AdaptiveDialogComponentRegistration implements ComponentRegistration {
private _resourceExplorer: ResourceExplorer;
Expand All @@ -36,7 +35,7 @@ export class AdaptiveDialogComponentRegistration implements ComponentRegistratio
this.registerBuilder('Microsoft.AdaptiveDialog', new AdaptiveTypeBuilder(AdaptiveDialog, this._resourceExplorer, {
'generator': new LanguageGeneratorConverter()
}));
this.registerBuilder('Microsoft.AdaptiveSkillDialog', new AdaptiveTypeBuilder(AdaptiveSkillDialog, this._resourceExplorer, {
this.registerBuilder('Microsoft.BeginSkill', new AdaptiveTypeBuilder(BeginSkill, this._resourceExplorer, {
'disabled': new BoolExpressionConverter(),
'activityProcessed': new BoolExpressionConverter(),
'resultProperty': new StringExpressionConverter(),
Expand Down
1 change: 0 additions & 1 deletion libraries/botbuilder-dialogs-adaptive/src/index.ts
Expand Up @@ -18,7 +18,6 @@ export * from './input';
export * from './luis';
export * from './recognizers';
export * from './selectors';
export * from './skills';
export * from './templates';
export * from './adaptiveDialog';
export * from './languageGenerationMiddleware';
Expand Down
8 changes: 0 additions & 8 deletions libraries/botbuilder-dialogs-adaptive/src/skills/index.ts

This file was deleted.

Expand Up @@ -12,7 +12,7 @@ const {
} = require('botbuilder-core');
const { BoolExpression, StringExpression } = require('adaptive-expressions');
const { DialogManager, DialogTurnStatus } = require('botbuilder-dialogs');
const { AdaptiveSkillDialog } = require('../')
const { BeginSkill } = require('../lib')


class SimpleConversationIdFactory extends SkillConversationIdFactoryBase {
Expand Down Expand Up @@ -55,7 +55,7 @@ class SimpleConversationIdFactory extends SkillConversationIdFactoryBase {
}
}

describe('SkillDialog', function() {
describe('BeginSkill', function() {
this.timeout(3000);

let activitySent; // Activity
Expand All @@ -79,10 +79,10 @@ describe('SkillDialog', function() {
const conversationState = new ConversationState(new MemoryStorage());
const dm = new DialogManager();
dm.conversationState = conversationState;
AdaptiveSkillDialog.setSkillHostOptions(dm, skillClient, new SimpleConversationIdFactory());
BeginSkill.setSkillHostOptions(dm, skillClient, new SimpleConversationIdFactory());

// Setup skill dialog
const dialog = new AdaptiveSkillDialog();
const dialog = new BeginSkill();
setSkillDialogOptions(dialog);
dm.rootDialog = dialog;

Expand Down Expand Up @@ -122,7 +122,7 @@ function setSkillDialogOptions(dialog) {
*/
function createSkillClientAndStub(captureAction, returnStatusCode = StatusCodes.OK) {
// This require should not fail as this method should only be called after verifying that botbuilder is resolvable.
const { BotFrameworkHttpClient } = require('../../botbuilder');
const { BotFrameworkHttpClient } = require('../../botbuilder/lib');

if (captureAction && typeof captureAction !== 'function') {
throw new TypeError(`Failed test arrangement - createSkillClientAndStub() received ${typeof captureAction} instead of undefined or a function.`);
Expand Down

0 comments on commit 001ecb5

Please sign in to comment.