Skip to content

Conversation

stevengum
Copy link
Member

@stevengum stevengum commented Apr 23, 2018

Add new M3 samples:

  • conversation-update-es6
  • echobot-console-es6
  • single-prompt-bot-es6
  • multiple-prompts-bot-es6
  • rich-cards-es6
  • dispatch-es6
  • luis-bot-es6 // Example already exists
  • qnamaker-bot-es6
  • echobot-es6-botframework-webchat

Cleanup:

  • Remove preexisting samples
  • Left echobot-es6 as part of parity with dotnet
  • Left dialogs per conversation with Steve

@coveralls
Copy link

coveralls commented Apr 23, 2018

Pull Request Test Coverage Report for Build 391

  • 0 of 0 (NaN%) changed or added relevant lines in 0 files are covered.
  • 420 unchanged lines in 5 files lost coverage.
  • Overall coverage decreased (-15.6%) to 65.283%

Files with Coverage Reduction New Missed Lines %
libraries/botbuilder/src/botFrameworkAdapter.ts 15 61.74%
libraries/botbuilder-ai/src/qnaMaker.ts 27 10.14%
libraries/botbuilder-prompts/src/oauthPrompt.ts 35 3.37%
libraries/botbuilder-ai/src/luisRecognizer.ts 107 2.48%
libraries/botbuilder-ai/src/languageTranslator.ts 236 1.54%
Totals Coverage Status
Change from base Build 352: -15.6%
Covered Lines: 1587
Relevant Lines: 2346

💛 - Coveralls

@stevengum
Copy link
Member Author

@CezaryMarcjan and @DeniseMak, can you take a look at the dispatch sample and let me know if you have any feedback regarding it?

Per the original email thread that outlines the samples to be added to the repo, I was planning on going back in and re-adding the QnAMaker KBID and Subscription Key for quick spin-up as QnAMaker does not have a "public" setting at this time.

Copy link

@CezaryMarcjan CezaryMarcjan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good but I'm not JS expert...

@stevengum stevengum requested a review from Stevenic April 30, 2018 18:12
@stevengum stevengum self-assigned this Apr 30, 2018
@stevengum stevengum changed the title DO NOT MERGE - M3 samples M3/M4 samples Apr 30, 2018
if (context.activity.type === 'conversationUpdate' && context.activity.membersAdded[0].name !== 'Bot') {
return context.sendActivity(`Hello "${context.activity.membersAdded[0].name}"!`);
}
if (context.activity.type === 'message') {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if [](start = 8, length = 2)

why not an "else if" ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I learned that from someone at CSE... But I will change it 👍

adapter.processActivity(req, res, (context) => {
// On "conversationUpdate"-type activities this bot will send a greeting message to users joining the conversation.
if (context.activity.type === 'conversationUpdate' && context.activity.membersAdded[0].name !== 'Bot') {
return context.sendActivity(`Hello "${context.activity.membersAdded[0].name}"!`);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

return [](start = 12, length = 6)

I think we've decided to use async/await in all the samples

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I recall that now, I'll go in and change this.


// create conversation state
const conversationState = new ConversationState(new MemoryStorage());
adapter.use(conversationState);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cash and I have decided that we should always show the use of both UserState() and ConversationState() in all samples with state. I can send you the general boilerplate to include

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've added the boilerplate to all the samples that were already using ConversationState, the only sample I didn't add it to was the conversationUpdate sample.

break;
default:
await dc.begin('None');
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be restructured a bit. I'll talk to you about this

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe I covered the changes we discussed, which was centered on how to call dc.continue(); I based the new changes on the sample code in samples/dialogs/alarmbot-ts.

Copy link

@DeniseMak DeniseMak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the dispatch sample, we need to decide what to do about the intent names being changed to have an underscore in the recognizer result. Should we just convert the "_" to a "."?

Also, it would be good to show in one of the samples how to use dialogs with LUIS recognizer middleware, since the middleware runs on every turn but dialogs can bypass the intent-checking logic.

@Stevenic Stevenic merged commit a2014b2 into microsoft:master May 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants