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
17 changes: 9 additions & 8 deletions Composer/packages/client/src/pages/design/creationModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ interface CreationModalProps {
export const CreationModal: React.FC<CreationModalProps> = (props) => {
const {
fetchStorages,
fetchTemplates,
fetchFolderItemsByPath,
setCreationFlowStatus,
createFolder,
Expand Down Expand Up @@ -66,7 +65,7 @@ export const CreationModal: React.FC<CreationModalProps> = (props) => {

const fetchResources = async () => {
await fetchStorages();
fetchTemplates();
fetchTemplatesV2();
Copy link
Contributor

Choose a reason for hiding this comment

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

the v2 is because we haven't removed the legacy code yet correct?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes correct. Right now we are prioritizing clean up the scenarios that will be tested by the larger audience during next weeks bug bash. Its on our backlog to clean up and remove loads of legacy code prior to release.

};

useEffect(() => {
Expand Down Expand Up @@ -103,6 +102,8 @@ export const CreationModal: React.FC<CreationModalProps> = (props) => {
description: formData.description,
location: formData.location,
schemaUrl: formData.schemaUrl,
runtimeType: formData.runtimeType,
runtimeLanguage: formData.runtimeLanguage,
appLocale,
templateDir: formData?.pvaData?.templateDir,
eTag: formData?.pvaData?.eTag,
Expand All @@ -124,16 +125,16 @@ export const CreationModal: React.FC<CreationModalProps> = (props) => {
props.onDismiss?.();
};

const handleDefineConversationSubmit = async (formData, templateId: string) => {
handleSubmit(formData, templateId);
};

const handleSubmit = async (formData, templateId: string) => {
handleDismiss();
saveTemplateId(templateId);
await handleCreateNew(formData, templateId);
};

const handleDefineConversationSubmit = async (formData, templateId: string) => {
handleSubmit(formData, templateId);
};

const handleCreateNext = async (templateId: string) => {
setCreationFlowStatus(CreationFlowStatus.NEW_FROM_TEMPLATE);
setTemplateId(templateId);
Expand All @@ -142,10 +143,10 @@ export const CreationModal: React.FC<CreationModalProps> = (props) => {
const openBot = async (botFolder) => {
handleDismiss();
if (creationFlowType === 'Skill') {
addExistingSkillToBotProject(botFolder);
addExistingSkillToBotProject(botFolder.path, botFolder.storage);
TelemetryClient.track('AddNewSkillCompleted');
} else {
openProject(botFolder);
openProject(botFolder.path, botFolder.storage);
}
};

Expand Down
Loading