MCPcopy Index your code
hub / github.com/codeaashu/claude-code / SandboxSettings

Function SandboxSettings

src/components/sandbox/SandboxSettings.tsx:22–221  ·  view source on GitHub ↗
(t0)

Source from the content-addressed store, hash-verified

20};
21type SandboxMode = 'auto-allow' | 'regular' | 'disabled';
22export function SandboxSettings(t0) {
23 const $ = _c(34);
24 const {
25 onComplete,
26 depCheck
27 } = t0;
28 const [theme] = useTheme();
29 const currentEnabled = SandboxManager.isSandboxingEnabled();
30 const currentAutoAllow = SandboxManager.isAutoAllowBashIfSandboxedEnabled();
31 const hasWarnings = depCheck.warnings.length > 0;
32 let t1;
33 if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
34 t1 = getSettings_DEPRECATED();
35 $[0] = t1;
36 } else {
37 t1 = $[0];
38 }
39 const settings = t1;
40 const allowAllUnixSockets = settings.sandbox?.network?.allowAllUnixSockets;
41 const showSocketWarning = hasWarnings && !allowAllUnixSockets;
42 const getCurrentMode = () => {
43 if (!currentEnabled) {
44 return "disabled";
45 }
46 if (currentAutoAllow) {
47 return "auto-allow";
48 }
49 return "regular";
50 };
51 const currentMode = getCurrentMode();
52 let t2;
53 if ($[1] !== theme) {
54 t2 = color("success", theme)("(current)");
55 $[1] = theme;
56 $[2] = t2;
57 } else {
58 t2 = $[2];
59 }
60 const currentIndicator = t2;
61 const t3 = currentMode === "auto-allow" ? `Sandbox BashTool, with auto-allow ${currentIndicator}` : "Sandbox BashTool, with auto-allow";
62 let t4;
63 if ($[3] !== t3) {
64 t4 = {
65 label: t3,
66 value: "auto-allow"
67 };
68 $[3] = t3;
69 $[4] = t4;
70 } else {
71 t4 = $[4];
72 }
73 const t5 = currentMode === "regular" ? `Sandbox BashTool, with regular permissions ${currentIndicator}` : "Sandbox BashTool, with regular permissions";
74 let t6;
75 if ($[5] !== t5) {
76 t6 = {
77 label: t5,
78 value: "regular"
79 };

Callers

nothing calls this directly

Calls 7

getCurrentModeFunction · 0.85
colorFunction · 0.85
useKeybindingsFunction · 0.85
isSandboxingEnabledMethod · 0.80
setSandboxSettingsMethod · 0.80
useThemeFunction · 0.50

Tested by

no test coverage detected