Skip to content

Commit 1774ae8

Browse files
tbrandtbrandaws
andauthored
Fix for bug where uploaded files disappear in agent use cases (#1263)
Co-authored-by: Taichiro Suzuki <taichirs@amazon.co.jp>
1 parent 1e3647b commit 1774ae8

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

packages/web/src/pages/AgentChatPage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ const AgentChatPage: React.FC = () => {
153153
setContent('');
154154
clearFiles();
155155
// eslint-disable-next-line react-hooks/exhaustive-deps
156-
}, [content, setFollowing]);
156+
}, [content, setFollowing, uploadedFiles]);
157157

158158
const onRetry = useCallback(() => {
159159
retryGeneration(

packages/web/src/pages/ChatPage.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,14 @@ const ChatPage: React.FC = () => {
236236
setContent('');
237237
clearFiles();
238238
// eslint-disable-next-line react-hooks/exhaustive-deps
239-
}, [content, base64Cache, fileUpload, setFollowing, overrideModelParameters]);
239+
}, [
240+
content,
241+
base64Cache,
242+
fileUpload,
243+
setFollowing,
244+
overrideModelParameters,
245+
uploadedFiles,
246+
]);
240247

241248
const onRetry = useCallback(() => {
242249
retryGeneration(

0 commit comments

Comments
 (0)