Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): Pi Auto defaults fall back to Auto-accept edits #33331

ClosedStiensWout(GitHub profile, opens in a new tab)wants to merge 4 commits intomain fromrefs/pull/33331/headopened View on GitHub

Showing 12 changed files with 17 additions and 5 deletions (loading 9).

x
0 of 12 viewed, 12 left
7 additions and 0 deletionsapps/mobile/src/features/threads/thread-settings-options.test.tsModified
View file
@@ -11,6 +11,7 @@
​
import {
RUNTIME_MODE_CHOICES,
+ compatibleRuntimeModeForChoices,
resolveNewThreadRuntimeMode,
selectableChoices,
withManagedRuntimeModeLimits,
@@ -24,6 +25,12 @@
​
describe("managed runtime mode limits", () => {
it("disables modes above the strictest target's ceiling with that target's reason", () => {
+ const piChoices = RUNTIME_MODE_CHOICES.filter((choice) => choice.mode !== "auto");
+ expect(compatibleRuntimeModeForChoices("auto", piChoices)).toBe("auto-accept-edits");
+ expect(compatibleRuntimeModeForChoices("full-access", piChoices)).toBe("full-access");
+ expect(compatibleRuntimeModeForChoices("approval-required", piChoices)).toBe(
+ "approval-required",
+ );
const choices = withManagedRuntimeModeLimits(RUNTIME_MODE_CHOICES, [
policy("Wide Corp", "auto"),
undefined,
5 additions and 3 deletionsapps/mobile/src/features/threads/thread-settings-options.tsModified
View file
@@ -1,6 +1,7 @@
import {
managedRuntimeModeDenial,
type ManagedPolicySummary,
+ resolveSupportedRuntimeMode,