- Only include `effort` in start command when a value is selected - Persist effort selection via composer draft state and hide picker when unavailable - Add optional `provider` to `ClientThreadTurnStartCommand` - Simplify thread model fallback selection in `ChatView`
Unified · Split
| @@ -2153,13 +2153,7 @@ export default function ChatView({ threadId }: ChatViewProps) { · 2152 unmodified lines | ||
| 2153 | 2153 | } |
| 2154 | 2154 | } |
| 2155 | 2155 | const title = truncateTitle(titleSeed); |
| 2156 | − let threadCreateModel = selectedModel; | |
| 2157 | − if (!threadCreateModel) { | |
| 2158 | − threadCreateModel = activeProject.model; | |
| 2159 | − } | |
| 2160 | − if (!threadCreateModel) { | |
| 2161 | − threadCreateModel = DEFAULT_MODEL; | |
| 2162 | − } | |
| 2156 | + let threadCreateModel: ModelSlug = selectedModel || (activeProject.model as ModelSlug) || DEFAULT_MODEL; | |
| 2163 | 2157 | |
| 2164 | 2158 | if (isLocalDraftThread) { |
| 2165 | 2159 | await api.orchestration.dispatchCommand({ |
| @@ -2228,7 +2222,7 @@ export default function ChatView({ threadId }: ChatViewProps) { · 62 unmodified lines | ||
| 2228 | 2222 | }, |
| 2229 | 2223 | model: selectedModel || undefined, |
| 2230 | 2224 | provider: selectedProvider, |
| 2231 | − ...(supportsReasoningEffort ? { effort: selectedEffort } : {}), | |
| 2225 | + ...(supportsReasoningEffort && selectedEffort ? { effort: selectedEffort } : {}), | |
| 2232 | 2226 | assistantDeliveryMode: settings.enableAssistantStreaming ? "streaming" : "buffered", |
| 2233 | 2227 | approvalPolicy, |
| 2234 | 2228 | sandboxMode, |
| @@ -2387,7 +2381,7 @@ export default function ChatView({ threadId }: ChatViewProps) { · 152 unmodified lines | ||
| 2387 | 2381 | ); |
| 2388 | 2382 | const onEffortSelect = useCallback( |
| 2389 | 2383 | (effort: CodexReasoningEffort) => { |
| 2390 | − setSelectedEffort(effort); | |
| 2384 | + setComposerDraftEffort(threadId, effort); | |
| 2391 | 2385 | scheduleComposerFocus(); |
| 2392 | 2386 | }, |
| 2393 | 2387 | [scheduleComposerFocus, setComposerDraftEffort, threadId], |
| @@ -2850,11 +2844,13 @@ export default function ChatView({ threadId }: ChatViewProps) { · 456 unmodified lines | ||
| 2850 | 2844 | <Separator orientation="vertical" className="mx-0.5 hidden h-4 sm:block" /> |
| 2851 | 2845 | |
| 2852 | 2846 | {/* Reasoning effort */} |
| 2853 | − <ReasoningEffortPicker | |
| 2854 | − effort={selectedEffort} | |
| 2855 | − options={reasoningOptions} | |
| 2856 | − onEffortChange={onEffortSelect} | |
| 2857 | − /> | |
| 2847 | + {selectedEffort != null && ( | |
| 2848 | + <ReasoningEffortPicker | |
| 2849 | + effort={selectedEffort} | |
| 2850 | + options={reasoningOptions} | |
| 2851 | + onEffortChange={onEffortSelect} | |
| 2852 | + /> | |
| 2853 | + )} | |
| 2858 | 2854 | </> |
| 2859 | 2855 | ) : null} |
| 2860 | 2856 | |
| @@ -348,6 +348,7 @@ export const ClientThreadTurnStartCommand = Schema.Struct({ · 347 unmodified lines | ||
| 348 | 348 | text: Schema.String, |
| 349 | 349 | attachments: Schema.Array(UploadChatAttachment), |
| 350 | 350 | }), |
| 351 | + provider: Schema.optional(ProviderKind), | |
| 351 | 352 | model: Schema.optional(TrimmedNonEmptyString), |
| 352 | 353 | effort: Schema.optional(TrimmedNonEmptyString), |
| 353 | 354 | assistantDeliveryMode: Schema.optional(AssistantDeliveryMode), |