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 4 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
8 changes: 3 additions & 5 deletions Composer/packages/client/src/pages/design/creationModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,28 +90,26 @@ export const CreationModal: React.FC<CreationModalProps> = (props) => {
location: formData.location,
schemaUrl: formData.schemaUrl,
appLocale,
isRoot: true,
};
if (creationFlowType === 'Skill') {
const templateVersion = templateProjects.find((template: BotTemplate) => {
return template.id == templateId;
})?.package?.packageVersion;
const newCreationBotData = {
templateId: templateId || '',
...newBotData,
templateVersion: templateVersion || '',
name: formData.name,
description: formData.description,
location: formData.location,
schemaUrl: formData.schemaUrl,
runtimeType: formData.runtimeType,
runtimeLanguage: formData.runtimeLanguage,
appLocale,
templateDir: formData?.pvaData?.templateDir,
eTag: formData?.pvaData?.eTag,
urlSuffix: formData?.pvaData?.urlSuffix,
preserveRoot: formData?.pvaData?.preserveRoot,
alias: formData?.alias,
profile: formData?.profile,
source: formData?.source,
isRoot: false,
};
createNewBotV2(newCreationBotData);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,7 @@ export const projectDispatcher = () => {
source,
runtimeType,
runtimeLanguage,
isRoot,
} = newProjectData;

// starts the creation process and stores the jobID in state for tracking
Expand All @@ -438,6 +439,7 @@ export const projectDispatcher = () => {
preserveRoot,
runtimeType,
runtimeLanguage,
isRoot,
});

if (response.data.jobId) {
Expand Down
5 changes: 3 additions & 2 deletions Composer/packages/server/src/services/project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ export class BotProjectService {

// generate an id and store it in the projectLocationMap
const projectId = await BotProjectService.generateProjectId(locationRef.path);
BotProjectService.addRecentProject(locationRef.path);
if (isRootBot) BotProjectService.addRecentProject(locationRef.path);
Store.set('projectLocationMap', BotProjectService.projectLocationMap);
return projectId.toString();
};
Expand Down Expand Up @@ -462,6 +462,7 @@ export class BotProjectService {
schemaUrl,
runtimeType,
runtimeLanguage,
isRoot: creatingRootBot,
Comment thread
beyackle marked this conversation as resolved.
Outdated
} = req.body;

// get user from request
Expand Down Expand Up @@ -562,7 +563,7 @@ export class BotProjectService {
const id = await BotProjectService.openProject(
{ storageId: rootBot?.storageId, path: rootBot.path },
user,
true
creatingRootBot ?? true
Comment thread
beyackle marked this conversation as resolved.
Outdated
);
const currentProject = await BotProjectService.getProjectById(id, user);
const project = currentProject.getProject();
Expand Down