MCPcopy
hub / github.com/codeaashu/claude-code / ThinkingToggle

Function ThinkingToggle

src/components/ThinkingToggle.tsx:18–151  ·  view source on GitHub ↗
(t0)

Source from the content-addressed store, hash-verified

16 isMidConversation?: boolean;
17};
18export function ThinkingToggle(t0) {
19 const $ = _c(27);
20 const {
21 currentValue,
22 onSelect,
23 onCancel,
24 isMidConversation
25 } = t0;
26 const exitState = useExitOnCtrlCDWithKeybindings();
27 const [confirmationPending, setConfirmationPending] = useState(null);
28 let t1;
29 if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
30 t1 = [{
31 value: "true",
32 label: "Enabled",
33 description: "Claude will think before responding"
34 }, {
35 value: "false",
36 label: "Disabled",
37 description: "Claude will respond without extended thinking"
38 }];
39 $[0] = t1;
40 } else {
41 t1 = $[0];
42 }
43 const options = t1;
44 let t2;
45 if ($[1] !== confirmationPending || $[2] !== onCancel) {
46 t2 = () => {
47 if (confirmationPending !== null) {
48 setConfirmationPending(null);
49 } else {
50 onCancel?.();
51 }
52 };
53 $[1] = confirmationPending;
54 $[2] = onCancel;
55 $[3] = t2;
56 } else {
57 t2 = $[3];
58 }
59 let t3;
60 if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
61 t3 = {
62 context: "Confirmation"
63 };
64 $[4] = t3;
65 } else {
66 t3 = $[4];
67 }
68 useKeybinding("confirm:no", t2, t3);
69 let t4;
70 if ($[5] !== confirmationPending || $[6] !== onSelect) {
71 t4 = () => {
72 if (confirmationPending !== null) {
73 onSelect(confirmationPending);
74 }
75 };

Callers

nothing calls this directly

Calls 4

useKeybindingFunction · 0.85
onCancelFunction · 0.50
onSelectFunction · 0.50

Tested by

no test coverage detected