Skip to content

Commit b19e2db

Browse files
committed
fix(web): block image uploads during plan mode questions
Use an error toast instead of a persisted banner when users try to attach images while plan mode questions are pending. Closes #499
1 parent 71a7473 commit b19e2db

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

apps/web/src/components/ChatView.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2034,6 +2034,14 @@ export default function ChatView({ threadId }: ChatViewProps) {
20342034
const addComposerImages = (files: File[]) => {
20352035
if (!activeThreadId || files.length === 0) return;
20362036

2037+
if (pendingUserInputs.length > 0) {
2038+
toastManager.add({
2039+
type: "error",
2040+
title: "Attach images after answering plan questions.",
2041+
});
2042+
return;
2043+
}
2044+
20372045
const nextImages: ComposerImageAttachment[] = [];
20382046
let nextImageCount = composerImagesRef.current.length;
20392047
let error: string | null = null;

0 commit comments

Comments
 (0)