Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 29 additions & 29 deletions Composer/packages/client/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -307,50 +307,50 @@ export const nameRegex = /^[a-zA-Z0-9-_]+$/;
export const adaptiveCardJsonBody =
'-```\
\n{\
\n $schema: http://adaptivecards.io/schemas/adaptive-card.json,\
\n version: 1.0,\
\n type: AdaptiveCard,\
\n speak: "",\
\n body: [\
\n "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",\
\n "version": "1.0",\
\n "type": "AdaptiveCard",\
\n "speak": "",\
\n "body": [\
\n {\
\n type: TextBlock,\
\n text: ${whichOneDidYouMean()},\
\n weight: Bolder\
\n "type": "TextBlock",\
\n "text": "${whichOneDidYouMean()}",\
\n "weight": "Bolder"\
\n },\
\n {\
\n type: TextBlock,\
\n text: ${pickOne()},\
\n separator: true\
\n "type": "TextBlock",\
\n "text": "${pickOne()}",\
\n "separator": "true"\
\n },\
\n {\
\n type: Input.ChoiceSet,\
\n placeholder: Placeholder text,\
\n id: userChosenIntent,\
\n choices: [\
\n "type": "Input.ChoiceSet",\
\n "placeholder": "Placeholder text",\
\n "id": "userChosenIntent",\
\n "choices": [\
\n {\
\n title: ${getIntentReadBack()},\
\n value: luisResult\
\n "title": "${getIntentReadBack()}",\
\n "value: "luisResult"\
\n },\
\n {\
\n title: ${getAnswerReadBack()},\
\n value: qnaResult\
\n "title": "${getAnswerReadBack()}",\
\n "value": "qnaResult"\
\n },\
\n {\
\n title: None of the above,\
\n value: none\
\n "title": "None of the above",\
\n "value": "none"\
\n }\
\n ],\
\n style: expanded,\
\n value: luis\
\n "style": "expanded",\
\n "value": "luis"\
\n },\
\n {\
\n type: ActionSet,\
\n actions: [\
\n "type": "ActionSet",\
\n "actions": [\
\n {\
\n type: Action.Submit,\
\n title: Submit,\
\n data: {\
\n intent: chooseIntentCardResponse\
\n "type": "Action.Submit",\
\n "title": "Submit",\
\n "data": {\
\n "intent": "chooseIntentCardResponse"\
\n }\
\n }\
\n ]\
Expand Down
7 changes: 6 additions & 1 deletion Composer/packages/client/src/pages/design/DesignPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -294,8 +294,13 @@ const DesignPage: React.FC<RouteComponentProps<{ dialogId: string; projectId: st
}

if (lgFile && lgFilePayload) {
if (lgFilePayload[`common.${locale}`] && lgFilePayload[`common.${locale}`].length > 0) {
await createLgTemplates({ id: `common.${locale}`, templates: lgFilePayload[`common.${locale}`] });
}
for (const key in lgFilePayload) {
await createLgTemplates({ id: key, templates: lgFilePayload[key] });
if (key !== `common.${locale}`) {
await createLgTemplates({ id: key, templates: lgFilePayload[key] });
}
}
}

Expand Down