The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 25, 10:00 UTC
Fix effort and provider handling in thread turn start
- 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`
Julius Marminge committed
Mar 2, 2026 at 16:42 UTC
feff86638ef7f08f6766350b8e84b151972eaaa7
2 files changed
+11
-14
apps/web/src/components/ChatView.tsx
+10
-14
@@ -2153,13 +2153,7 @@ export default function ChatView({ threadId }: ChatViewProps) {
2153
}
2154
}
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;
2157
2158
if (isLocalDraftThread) {
2159
await api.orchestration.dispatchCommand({
@@ -2228,7 +2222,7 @@ export default function ChatView({ threadId }: ChatViewProps) {
2222
},
2223
model: selectedModel || undefined,
2224
provider: selectedProvider,
2231
- ...(supportsReasoningEffort ? { effort: selectedEffort } : {}),
2225
+ ...(supportsReasoningEffort && selectedEffort ? { effort: selectedEffort } : {}),
2226
assistantDeliveryMode: settings.enableAssistantStreaming ? "streaming" : "buffered",
2227
approvalPolicy,
2228
sandboxMode,
@@ -2387,7 +2381,7 @@ export default function ChatView({ threadId }: ChatViewProps) {
2381
);
2382
const onEffortSelect = useCallback(
2383
(effort: CodexReasoningEffort) => {
2390
- setSelectedEffort(effort);
2384
+ setComposerDraftEffort(threadId, effort);
2385
scheduleComposerFocus();
2386
},
2387
[scheduleComposerFocus, setComposerDraftEffort, threadId],
@@ -2850,11 +2844,13 @@ export default function ChatView({ threadId }: ChatViewProps) {
2844
<Separator orientation="vertical" className="mx-0.5 hidden h-4 sm:block" />
2845
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
+ )}
2854
</>
2855
) : null}
2856
packages/contracts/src/orchestration.ts
+1
@@ -348,6 +348,7 @@ export const ClientThreadTurnStartCommand = Schema.Struct({
348
text: Schema.String,
349
attachments: Schema.Array(UploadChatAttachment),
350
}),
351
+ provider: Schema.optional(ProviderKind),
352
model: Schema.optional(TrimmedNonEmptyString),
353
effort: Schema.optional(TrimmedNonEmptyString),
354
assistantDeliveryMode: Schema.optional(AssistantDeliveryMode),