fix: block image uploads during plan mode questions (#621)

This commit is contained in:
(CJ) Chukwudi Nwobodo authored and GitHub committed 2026-03-12 17:24:53 -07:00
1 parent 71a7473a81
commit a14debc83e
1 file changed
+8
+8
View File
@@ -2034,6 +2034,14 @@ export default function ChatView({ threadId }: ChatViewProps) {
const addComposerImages = (files: File[]) => {
if (!activeThreadId || files.length === 0) return;
if (pendingUserInputs.length > 0) {
toastManager.add({
type: "error",
title: "Attach images after answering plan questions.",
});
return;
}
const nextImages: ComposerImageAttachment[] = [];
let nextImageCount = composerImagesRef.current.length;
let error: string | null = null;