Note: Per-model parameters are now configured via the settings icon on each model chip in @@ -443,6 +448,8 @@ function AllFeaturesStory() { vectorStoreOwnerId="user_123" clientSideRAG={clientSideRAG} onClientSideRAGChange={setClientSideRAG} + maxToolIterations={maxToolIterations} + onMaxToolIterationsChange={setMaxToolIterations} captureRawSSEEvents={captureRawSSEEvents} onCaptureRawSSEEventsChange={setCaptureRawSSEEvents} /> diff --git a/ui/src/components/ConversationSettingsModal/ConversationSettingsModal.tsx b/ui/src/components/ConversationSettingsModal/ConversationSettingsModal.tsx index 72dcf29..356f411 100644 --- a/ui/src/components/ConversationSettingsModal/ConversationSettingsModal.tsx +++ b/ui/src/components/ConversationSettingsModal/ConversationSettingsModal.tsx @@ -41,6 +41,10 @@ interface ConversationSettingsModalProps { clientSideRAG?: boolean; /** Callback when client-side RAG setting changes */ onClientSideRAGChange?: (enabled: boolean) => void; + /** Maximum tool execution iterations */ + maxToolIterations?: number; + /** Callback when max tool iterations changes */ + onMaxToolIterationsChange?: (iterations: number) => void; /** Whether to capture raw SSE events for debugging */ captureRawSSEEvents?: boolean; /** Callback when SSE capture setting changes */ @@ -74,6 +78,8 @@ export function ConversationSettingsModal({ vectorStoreOwnerId, clientSideRAG, onClientSideRAGChange, + maxToolIterations = 25, + onMaxToolIterationsChange, captureRawSSEEvents, onCaptureRawSSEEventsChange, ttsVoice = DEFAULT_TTS_VOICE, @@ -91,6 +97,15 @@ export function ConversationSettingsModal({ el.style.height = `${el.scrollHeight}px`; }, []); + // Stable ref callback so auto-resize only fires on mount, not every render + // (an inline ref would re-fire and collapse the textarea, scrolling the modal to top) + const textareaRef = useCallback( + (el: HTMLTextAreaElement | null) => { + if (el) autoResize(el); + }, + [autoResize] + ); + const handleSaveAsTemplate = () => { setPromptFormOpen(true); }; @@ -168,9 +183,7 @@ export function ConversationSettingsModal({