Align Claude permissions and provider-specific reasoning effort
- Default Claude sessions to bypass permissions when approval policy is `never`, while preserving explicit `permissionMode` - Hide/send reasoning effort only for providers that support it in ChatView - Add coverage for Claude permission-mode derivation and precedence, and update runtime event model docs
This commit is contained in:
1 parent
9bb6ab317a
commit
13e7249b3b
6 files changed
+608
-10
No files matched your search
@@ -8,12 +8,12 @@ import {
|
||||
type MessageId,
|
||||
getDefaultModel,
|
||||
getModelOptions,
|
||||
getReasoningOptions,
|
||||
type ProjectId,
|
||||
type ProjectEntry,
|
||||
type ProjectScript,
|
||||
PROVIDER_SEND_TURN_MAX_ATTACHMENTS,
|
||||
PROVIDER_SEND_TURN_MAX_IMAGE_BYTES,
|
||||
REASONING_OPTIONS,
|
||||
type ReasoningEffort,
|
||||
type ResolvedKeybindingsConfig,
|
||||
type ProviderApprovalDecision,
|
||||
@@ -659,6 +659,8 @@ export default function ChatView({ threadId }: ChatViewProps) {
|
||||
);
|
||||
const selectedModel = resolveModelSlugForProvider(selectedProvider, composerDraft.model ?? baseThreadModel);
|
||||
const selectedEffort = composerDraft.effort ?? DEFAULT_REASONING;
|
||||
const reasoningOptions = getReasoningOptions(selectedProvider);
|
||||
const supportsReasoningEffort = reasoningOptions.length > 0;
|
||||
const searchableModelOptions = useMemo(
|
||||
() =>
|
||||
PROVIDER_OPTIONS.filter((option) => option.available).flatMap((option) =>
|
||||
@@ -2168,7 +2170,7 @@ export default function ChatView({ threadId }: ChatViewProps) {
|
||||
},
|
||||
model: selectedModel || undefined,
|
||||
provider: selectedProvider,
|
||||
effort: selectedEffort || undefined,
|
||||
...(supportsReasoningEffort ? { effort: selectedEffort } : {}),
|
||||
assistantDeliveryMode: settings.enableAssistantStreaming ? "streaming" : "buffered",
|
||||
approvalPolicy,
|
||||
sandboxMode,
|
||||
@@ -2722,10 +2724,17 @@ export default function ChatView({ threadId }: ChatViewProps) {
|
||||
<Separator orientation="vertical" className="mx-0.5 hidden h-4 sm:block" />
|
||||
|
||||
{/* Reasoning effort */}
|
||||
<ReasoningEffortPicker effort={selectedEffort} onEffortChange={onEffortSelect} />
|
||||
|
||||
{/* Divider */}
|
||||
<Separator orientation="vertical" className="mx-0.5 hidden h-4 sm:block" />
|
||||
{supportsReasoningEffort ? (
|
||||
<>
|
||||
<ReasoningEffortPicker
|
||||
effort={selectedEffort}
|
||||
options={reasoningOptions}
|
||||
onEffortChange={onEffortSelect}
|
||||
/>
|
||||
{/* Divider */}
|
||||
<Separator orientation="vertical" className="mx-0.5 hidden h-4 sm:block" />
|
||||
</>
|
||||
) : null}
|
||||
|
||||
{/* Runtime mode toggle */}
|
||||
<Button
|
||||
@@ -3945,6 +3954,7 @@ const ProviderModelPicker = memo(function ProviderModelPicker(props: {
|
||||
|
||||
const ReasoningEffortPicker = memo(function ReasoningEffortPicker(props: {
|
||||
effort: ReasoningEffort;
|
||||
options: ReadonlyArray<ReasoningEffort>;
|
||||
onEffortChange: (effort: ReasoningEffort) => void;
|
||||
}) {
|
||||
return (
|
||||
@@ -3956,7 +3966,7 @@ const ReasoningEffortPicker = memo(function ReasoningEffortPicker(props: {
|
||||
<SelectValue />
|
||||
</SelectTrigger>
|
||||
<SelectPopup alignItemWithTrigger={false}>
|
||||
{REASONING_OPTIONS.map((effort) => (
|
||||
{props.options.map((effort) => (
|
||||
<SelectItem key={effort} value={effort}>
|
||||
{effort}
|
||||
{effort === DEFAULT_REASONING ? " (default)" : ""}
|
||||
|
||||
Reference in new issue
Block a user