diff --git a/apps/web/app/components/chat-panel.tsx b/apps/web/app/components/chat-panel.tsx index 5e8b6511083..2066b8e4512 100644 --- a/apps/web/app/components/chat-panel.tsx +++ b/apps/web/app/components/chat-panel.tsx @@ -700,7 +700,7 @@ export const ChatPanel = forwardRef( savedMessageIdsRef.current.clear(); isFirstFileMessageRef.current = true; - (async () => { + void (async () => { const sessions = (await fetchFileSessionsRef.current?.()) ?? []; if (cancelled) { @@ -799,15 +799,15 @@ export const ChatPanel = forwardRef( savedMessageIdsRef.current.add(m.id); } - if (filePath) { - fetchFileSessionsRef.current?.().then( - (sessions) => { - setFileSessions(sessions); - }, - ); - } + if (filePath) { + void fetchFileSessionsRef.current?.().then( + (sessions) => { + setFileSessions(sessions); + }, + ); + } - if (filePath && onFileChanged) { + if (filePath && onFileChanged) { fetch( `/api/workspace/file?path=${encodeURIComponent(filePath)}`, ) @@ -877,13 +877,13 @@ export const ChatPanel = forwardRef( onActiveSessionChange?.(sessionId); onSessionsChange?.(); - if (filePath) { - fetchFileSessionsRef.current?.().then( - (sessions) => { - setFileSessions(sessions); - }, - ); - } + if (filePath) { + void fetchFileSessionsRef.current?.().then( + (sessions) => { + setFileSessions(sessions); + }, + ); + } } // Build message with optional attachment prefix @@ -907,8 +907,8 @@ export const ChatPanel = forwardRef( isFirstFileMessageRef.current = false; } - sendMessage({ text: messageText }); - }, + void sendMessage({ text: messageText }); + }, [ attachedFiles, isStreaming, @@ -929,9 +929,9 @@ export const ChatPanel = forwardRef( return; } - // Stop any active stream/reconnection for the old session. - reconnectAbortRef.current?.abort(); - stop(); + // Stop any active stream/reconnection for the old session. + reconnectAbortRef.current?.abort(); + void stop(); setLoadingSession(true); setCurrentSessionId(sessionId); @@ -1006,9 +1006,9 @@ export const ChatPanel = forwardRef( ], ); - const handleNewSession = useCallback(async () => { - reconnectAbortRef.current?.abort(); - stop(); + const handleNewSession = useCallback(async () => { + reconnectAbortRef.current?.abort(); + void stop(); setIsReconnecting(false); setCurrentSessionId(null); sessionIdRef.current = null; @@ -1066,9 +1066,9 @@ export const ChatPanel = forwardRef( reconnectAbortRef.current?.abort(); setIsReconnecting(false); - // Stop the useChat transport stream - stop(); - }, [currentSessionId, stop]); + // Stop the useChat transport stream + void stop(); + }, [currentSessionId, stop]); // ── Attachment handlers ── @@ -1378,7 +1378,7 @@ export const ChatPanel = forwardRef( style={{ background: "var(--color-bg)" }} >