Skip to content
This repository was archived by the owner on Jun 30, 2022. It is now read-only.

Commit 34d195c

Browse files
Batta32LCarbonellRod
authored andcommitted
Fix duplicate utterances text issue (#2853)
Co-authored-by: Luis Sergio <[email protected]>
1 parent a2b597c commit 34d195c

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

sdk/csharp/libraries/microsoft.bot.builder.solutions/Skills/Manifest/SkillManifestGenerator.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,13 @@ public async Task<SkillManifest> GenerateManifestAsync(string manifestFile, stri
9292
{
9393
// We will retrieve all utterances from the referenced source and aggregate into one new aggregated list of utterances per action
9494
action.Definition.Triggers.Utterances = new List<Utterance>();
95-
var utterancesToAdd = new List<string>();
95+
List<string> utterancesToAdd;
9696

9797
// Iterate through each utterance source, one per locale.
9898
foreach (UtteranceSource utteranceSource in action.Definition.Triggers.UtteranceSources)
9999
{
100+
utterancesToAdd = new List<string>();
101+
100102
// There may be multiple intents linked to this
101103
foreach (var source in utteranceSource.Source)
102104
{

sdk/typescript/libraries/botbuilder-skills/src/skillManifestGenerator.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,12 @@ export class SkillManifestGenerator {
6060
// We will retrieve all utterances from the referenced source
6161
// and aggregate into one new aggregated list of utterances per action
6262
action.definition.triggers.utterances = [];
63-
const utterancesToAdd: string[] = [];
63+
let utterancesToAdd: string[];
6464

6565
// Iterate through each utterance source, one per locale.
6666
action.definition.triggers.utteranceSources.forEach((utteranceSource: IUtteranceSources): void => {
67+
68+
utterancesToAdd = [];
6769
// There may be multiple intents linked to this
6870
utteranceSource.source.forEach((source: string): void => {
6971
// Retrieve the intent mapped to this action trigger

0 commit comments

Comments
 (0)