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`
This commit is contained in:
1 parent
ad28eaa86f
commit
feff86638e
2 files changed
+11
-14
No files matched your search
@@ -2153,13 +2153,7 @@ export default function ChatView({ threadId }: ChatViewProps) {
|
||||
}
|
||||
}
|
||||
const title = truncateTitle(titleSeed);
|
||||
let threadCreateModel = selectedModel;
|
||||
if (!threadCreateModel) {
|
||||
threadCreateModel = activeProject.model;
|
||||
}
|
||||
if (!threadCreateModel) {
|
||||
threadCreateModel = DEFAULT_MODEL;
|
||||
}
|
||||
let threadCreateModel: ModelSlug = selectedModel || (activeProject.model as ModelSlug) || DEFAULT_MODEL;
|
||||
|
||||
if (isLocalDraftThread) {
|
||||
await api.orchestration.dispatchCommand({
|
||||
@@ -2228,7 +2222,7 @@ export default function ChatView({ threadId }: ChatViewProps) {
|
||||
},
|
||||
model: selectedModel || undefined,
|
||||
provider: selectedProvider,
|
||||
...(supportsReasoningEffort ? { effort: selectedEffort } : {}),
|
||||
...(supportsReasoningEffort && selectedEffort ? { effort: selectedEffort } : {}),
|
||||
assistantDeliveryMode: settings.enableAssistantStreaming ? "streaming" : "buffered",
|
||||
approvalPolicy,
|
||||
sandboxMode,
|
||||
@@ -2387,7 +2381,7 @@ export default function ChatView({ threadId }: ChatViewProps) {
|
||||
);
|
||||
const onEffortSelect = useCallback(
|
||||
(effort: CodexReasoningEffort) => {
|
||||
setSelectedEffort(effort);
|
||||
setComposerDraftEffort(threadId, effort);
|
||||
scheduleComposerFocus();
|
||||
},
|
||||
[scheduleComposerFocus, setComposerDraftEffort, threadId],
|
||||
@@ -2850,11 +2844,13 @@ export default function ChatView({ threadId }: ChatViewProps) {
|
||||
<Separator orientation="vertical" className="mx-0.5 hidden h-4 sm:block" />
|
||||
|
||||
{/* Reasoning effort */}
|
||||
<ReasoningEffortPicker
|
||||
effort={selectedEffort}
|
||||
options={reasoningOptions}
|
||||
onEffortChange={onEffortSelect}
|
||||
/>
|
||||
{selectedEffort != null && (
|
||||
<ReasoningEffortPicker
|
||||
effort={selectedEffort}
|
||||
options={reasoningOptions}
|
||||
onEffortChange={onEffortSelect}
|
||||
/>
|
||||
)}
|
||||
</>
|
||||
) : null}
|
||||
|
||||
|
||||
@@ -348,6 +348,7 @@ export const ClientThreadTurnStartCommand = Schema.Struct({
|
||||
text: Schema.String,
|
||||
attachments: Schema.Array(UploadChatAttachment),
|
||||
}),
|
||||
provider: Schema.optional(ProviderKind),
|
||||
model: Schema.optional(TrimmedNonEmptyString),
|
||||
effort: Schema.optional(TrimmedNonEmptyString),
|
||||
assistantDeliveryMode: Schema.optional(AssistantDeliveryMode),
|
||||
|
||||
Reference in new issue
Block a user