Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix: threads step down to the broadest permission mode their provider offers #30552

Openjuliusmarmingewants to merge 6 commits intomain fromrefs/pull/30552/headopened View on GitHub

Showing 14 changed files with 12 additions and 6 deletions (loading 11).

x
0 of 14 viewed, 14 left
9 additions and 3 deletionsapps/mobile/src/features/threads/thread-settings-options.tsModified
View file
@@ -1,4 +1,5 @@
import {
+ broadestRuntimeModeWithin,
managedRuntimeModeDenial,
type ManagedPolicySummary,
type RuntimeMode,
@@ -78,9 +79,14 @@
runtimeMode: RuntimeMode,
choices: ReadonlyArray<{ readonly mode: RuntimeMode }>,
): RuntimeMode {
- return choices.some((choice) => choice.mode === runtimeMode)
- ? runtimeMode
- : (choices[0]?.mode ?? runtimeMode);
+ return (
+ broadestRuntimeModeWithin(
+ runtimeMode,
+ choices.map((choice) => choice.mode),
+ ) ??
+ choices[0]?.mode ??
+ runtimeMode
+ );
​
export { selectableProviderOptionChoices as selectableChoices } from "@t3tools/client-runtime/model-traits";
1 addition and 1 deletionapps/server/src/mcp/toolkits/project/handlers.test.tsModified
View file
@@ -278,7 +278,7 @@
​