-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Add Claude Code auto permission mode as a 4th runtime mode #3628
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,6 +15,7 @@ export type ModelOption = { | |
| readonly providerKey: string; | ||
| readonly providerLabel: string; | ||
| readonly providerDriver: string; | ||
| readonly supportsAutoRuntimeMode: boolean; | ||
| readonly capabilities: ModelCapabilities | null; | ||
| readonly selection: ModelSelection; | ||
| }; | ||
|
|
@@ -78,6 +79,7 @@ export function buildModelOptions( | |
| providerKey: provider.instanceId, | ||
| providerLabel, | ||
| providerDriver: provider.driver, | ||
| supportsAutoRuntimeMode: provider.supportsAutoRuntimeMode ?? false, | ||
| capabilities: model.capabilities, | ||
| selection: normalizeSelectionOptions( | ||
| { | ||
|
|
@@ -107,6 +109,7 @@ export function buildModelOptions( | |
| providerKey: fallbackModelSelection.instanceId, | ||
| providerLabel, | ||
| providerDriver: fallbackModelSelection.instanceId, | ||
| supportsAutoRuntimeMode: false, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fallback options hide Auto modeMedium Severity Synthetic Additional Locations (2)Reviewed by Cursor Bugbot for commit 45eddfd. Configure here. |
||
| capabilities: null, | ||
| selection: fallbackModelSelection, | ||
| }); | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -117,6 +117,7 @@ export type ModelSelection = typeof ModelSelection.Type; | |
| export const RuntimeMode = Schema.Literals([ | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 Medium Adding 🤖 Copy this AI Prompt to have your agent fix this: |
||
| "approval-required", | ||
| "auto-accept-edits", | ||
| "auto", | ||
| "full-access", | ||
| ]); | ||
| export type RuntimeMode = typeof RuntimeMode.Type; | ||
|
|
||


There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟡 Medium
threads/NewTaskDraftScreen.tsx:241When the selected model does not support the
"auto"runtime mode (flow.selectedModelOption?.supportsAutoRuntimeModeis false), the menu hides the"auto"option butflow.runtimeModeis never normalized back to a supported value. If the user previously selected"auto"with a supporting model and then switches to an unsupported model, the options menu subtitle still labels the runtime as"Auto", andhandleStart()submitsruntimeMode: "auto"tocreateProjectThreadfor a provider that does not expose that mode. Consider resettingflow.runtimeModewheneversupportsAutoRuntimeModetransitions to false so the submitted runtime mode stays within the selected provider's supported set.Also found in 1 other location(s)
apps/mobile/src/features/threads/ThreadComposer.tsx:555🤖 Copy this AI Prompt to have your agent fix this: