+
Native runner configuration
+
+ The existing runtime fields with the new Pi option selected. Changes
+ stay in this story.
+
+
original}
+ mark={(_group, field, value) =>
+ setConfig((previous) => ({ ...previous, [field]: value }))
+ }
+ models={[]}
+ hideInstructionsFile
+ managedSandboxOnly
+ />
+
+ );
+}
+
+function CliAuthScenario({
+ state,
+}: {
+ state: "pending" | "approved" | "signin" | "expired";
+}) {
+ const client = useQueryClient();
+ const navigate = useNavigate();
+ const location = useLocation();
+ const path = "/cli-auth/storybook-challenge";
+ useState(() => {
+ client.setQueryData(
+ ["cli-auth-challenge", "storybook-challenge", "storybook-demo"],
+ {
+ id: "storybook-challenge",
+ status: state === "signin" ? "pending" : state,
+ requiresSignIn: state === "signin",
+ canApprove: state === "pending",
+ command: "paperclipai auth login",
+ clientName: "Design review fixture",
+ requestedAccess: "board",
+ requestedCompanyName: "Paperclip Storybook",
+ },
+ );
+ return true;
+ });
+ const onRoute = location.pathname === path;
+ useEffect(() => {
+ if (!onRoute) navigate(`${path}?token=storybook-demo`, { replace: true });
+ }, [onRoute, navigate]);
+ return onRoute ? (
+