Skip to content

Commit 9ac0931

Browse files
committed
fixup
1 parent b81219a commit 9ac0931

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/browser/components/AIView.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)