fix: handleSubmit useCalback add thinkingMode to dependencies

This commit is contained in:
Haileyesus Dessie
2026-01-22 13:40:35 +03:00
parent 79f7bf9a63
commit cf0f60bc48

View File

@@ -4361,7 +4361,7 @@ function ChatInterface({ selectedProject, selectedSession, ws, sendMessage, mess
// Send Cursor command (always use cursor-command; include resume/sessionId when replying) // Send Cursor command (always use cursor-command; include resume/sessionId when replying)
sendMessage({ sendMessage({
type: 'cursor-command', type: 'cursor-command',
command: input, command: messageContent,
sessionId: effectiveSessionId, sessionId: effectiveSessionId,
options: { options: {
// Prefer fullPath (actual cwd for project), fallback to path // Prefer fullPath (actual cwd for project), fallback to path
@@ -4378,7 +4378,7 @@ function ChatInterface({ selectedProject, selectedSession, ws, sendMessage, mess
// Send Codex command // Send Codex command
sendMessage({ sendMessage({
type: 'codex-command', type: 'codex-command',
command: input, command: messageContent,
sessionId: effectiveSessionId, sessionId: effectiveSessionId,
options: { options: {
cwd: selectedProject.fullPath || selectedProject.path, cwd: selectedProject.fullPath || selectedProject.path,
@@ -4423,7 +4423,7 @@ function ChatInterface({ selectedProject, selectedSession, ws, sendMessage, mess
if (selectedProject) { if (selectedProject) {
safeLocalStorage.removeItem(`draft_input_${selectedProject.name}`); safeLocalStorage.removeItem(`draft_input_${selectedProject.name}`);
} }
}, [input, isLoading, selectedProject, attachedImages, currentSessionId, selectedSession, provider, permissionMode, onSessionActive, cursorModel, claudeModel, codexModel, sendMessage, setInput, setAttachedImages, setUploadingImages, setImageErrors, setIsTextareaExpanded, textareaRef, setChatMessages, setIsLoading, setCanAbortSession, setClaudeStatus, setIsUserScrolledUp, scrollToBottom]); }, [input, isLoading, selectedProject, attachedImages, currentSessionId, selectedSession, provider, permissionMode, onSessionActive, cursorModel, claudeModel, codexModel, sendMessage, setInput, setAttachedImages, setUploadingImages, setImageErrors, setIsTextareaExpanded, textareaRef, setChatMessages, setIsLoading, setCanAbortSession, setClaudeStatus, setIsUserScrolledUp, scrollToBottom, thinkingMode]);
const handleGrantToolPermission = useCallback((suggestion) => { const handleGrantToolPermission = useCallback((suggestion) => {
if (!suggestion || provider !== 'claude') { if (!suggestion || provider !== 'claude') {