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

Function AutoModeOptInDialog

src/components/AutoModeOptInDialog.tsx:17–138  ·  view source on GitHub ↗
(t0)

Source from the content-addressed store, hash-verified

15 declineExits?: boolean;
16};
17export function AutoModeOptInDialog(t0) {
18 const $ = _c(18);
19 const {
20 onAccept,
21 onDecline,
22 declineExits
23 } = t0;
24 let t1;
25 if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
26 t1 = [];
27 $[0] = t1;
28 } else {
29 t1 = $[0];
30 }
31 React.useEffect(_temp, t1);
32 let t2;
33 if ($[1] !== onAccept || $[2] !== onDecline) {
34 t2 = function onChange(value) {
35 bb3: switch (value) {
36 case "accept":
37 {
38 logEvent("tengu_auto_mode_opt_in_dialog_accept", {});
39 updateSettingsForSource("userSettings", {
40 skipAutoPermissionPrompt: true
41 });
42 onAccept();
43 break bb3;
44 }
45 case "accept-default":
46 {
47 logEvent("tengu_auto_mode_opt_in_dialog_accept_default", {});
48 updateSettingsForSource("userSettings", {
49 skipAutoPermissionPrompt: true,
50 permissions: {
51 defaultMode: "auto"
52 }
53 });
54 onAccept();
55 break bb3;
56 }
57 case "decline":
58 {
59 logEvent("tengu_auto_mode_opt_in_dialog_decline", {});
60 onDecline();
61 }
62 }
63 };
64 $[1] = onAccept;
65 $[2] = onDecline;
66 $[3] = t2;
67 } else {
68 t2 = $[3];
69 }
70 const onChange = t2;
71 let t3;
72 if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
73 t3 = <Box flexDirection="column" gap={1}><Text>{AUTO_MODE_DESCRIPTION}</Text><Link url="https://code.claude.com/docs/en/security" /></Box>;
74 $[4] = t3;

Callers

nothing calls this directly

Calls 3

logEventFunction · 0.85
updateSettingsForSourceFunction · 0.85
onChangeFunction · 0.50

Tested by

no test coverage detected