Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.

Commit 6550a5b

Browse files
authored
Merge branch 'main' into abrown/fix/security-issue
2 parents c44dc1a + 70f12ea commit 6550a5b

File tree

6 files changed

+20
-5
lines changed

6 files changed

+20
-5
lines changed

Composer/packages/client/src/components/CreationFlow/DefineConversation.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ const DefineConversation: React.FC<DefineConversationProps> = (props) => {
216216
<Fragment>
217217
<DialogWrapper
218218
isOpen
219-
{...DialogCreationCopy.DEFINE_CONVERSATION_OBJECTIVE}
219+
{...DialogCreationCopy.DEFINE_BOT_PROJECT}
220220
dialogType={DialogTypes.CreateFlow}
221221
onDismiss={onDismiss}
222222
>

Composer/packages/client/src/constants.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,14 @@ export const DialogCreationCopy = {
108108
`What can the user accomplish through this conversation? For example, BookATable, OrderACoffee etc.`
109109
),
110110
},
111+
DEFINE_BOT_PROJECT: {
112+
title: formatMessage('Create a bot project'),
113+
subText: formatMessage(`Specify a name, description, and location for your new bot project.`),
114+
},
115+
DEFINE_DIALOG: {
116+
title: formatMessage('Create a dialog'),
117+
subText: formatMessage(`Specify a name and description for your new dialog.`),
118+
},
111119
SELECT_LOCATION: {
112120
title: formatMessage('Select a Bot'),
113121
subText: formatMessage('Which bot do you want to open?'),

Composer/packages/client/src/pages/design/createDialogModal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export const CreateDialogModal: React.FC<CreateDialogModalProps> = (props) => {
7171
<DialogWrapper
7272
isOpen={isOpen}
7373
onDismiss={onDismiss}
74-
{...DialogCreationCopy.DEFINE_CONVERSATION_OBJECTIVE}
74+
{...DialogCreationCopy.DEFINE_DIALOG}
7575
dialogType={DialogTypes.DesignFlow}
7676
>
7777
<form onSubmit={handleSubmit}>

Composer/packages/intellisense/src/components/IntellisenseTextField.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,8 @@
22
// Licensed under the MIT License.
33

44
import React from 'react';
5-
65
import { useLanguageServer } from '../hooks/useLanguageServer';
76
import { checkIsOutside } from '../utils/uiUtils';
8-
97
import { CompletionList } from './CompletionList';
108

119
export const IntellisenseTextField = React.memo(
@@ -42,7 +40,7 @@ export const IntellisenseTextField = React.memo(
4240
if (value !== undefined && value !== textFieldValue) {
4341
setTextFieldValue(value);
4442
}
45-
}, [value]);
43+
}, [value, textFieldValue]);
4644

4745
// Show the completion list again every time the results are different (unless something was just selected from the list)
4846
React.useEffect(() => {

Composer/packages/server/src/services/project.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,10 @@ export class BotProjectService {
147147
throw new Error(`file ${locationRef.path} does not exist`);
148148
}
149149

150+
if (!(await StorageService.checkIsBotFolder(locationRef.storageId, locationRef.path, user))) {
151+
throw new Error(`${locationRef.path} is not a bot project folder`);
152+
}
153+
150154
for (const key in BotProjectService.projectLocationMap) {
151155
if (BotProjectService.projectLocationMap[key] === locationRef.path) {
152156
// TODO: this should probably move to getProjectById

Composer/packages/server/src/services/storage.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,11 @@ class StorageService {
138138
}
139139
};
140140

141+
public checkIsBotFolder = async (storageId: string, path: string, user?: UserIdentity) => {
142+
const storageClient = this.getStorageClient(storageId, user);
143+
return await this.isBotFolder(storageClient, path);
144+
};
145+
141146
private ensureDefaultBotFoldersExist = () => {
142147
this.storageConnections.forEach((s) => {
143148
this.createFolderRecurively(s.defaultPath);

0 commit comments

Comments
 (0)