File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -141,6 +141,9 @@ const AIViewInner: React.FC<AIViewProps> = ({
141141 markUserInteraction,
142142 } = useAutoScroll ( ) ;
143143
144+ // Use send options for auto-compaction check
145+ const pendingSendOptions = useSendMessageOptions ( workspaceId ) ;
146+
144147 // ChatInput API for focus management
145148 const chatInputAPI = useRef < ChatInputAPI | null > ( null ) ;
146149 const handleChatInputReady = useCallback ( ( api : ChatInputAPI ) => {
@@ -332,7 +335,6 @@ const AIViewInner: React.FC<AIViewProps> = ({
332335 // Use pending send model for auto-compaction check, not the last stream's model.
333336 // This ensures the threshold is based on the model the user will actually send with,
334337 // preventing context-length errors when switching from a large-context to smaller model.
335- const pendingSendOptions = useSendMessageOptions ( workspaceId ) ;
336338 const pendingModel = pendingSendOptions . model ;
337339
338340 const autoCompactionCheck = pendingModel
You can’t perform that action at this time.
0 commit comments