MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / PromptDialog

Function PromptDialog

source code/components/hooks/PromptDialog.tsx:17–84  ·  view source on GitHub ↗
(t0)

Source from the content-addressed store, hash-verified

15 onAbort: () => void;
16};
17export function PromptDialog(t0) {
18 const $ = _c(15);
19 const {
20 title,
21 toolInputSummary,
22 request,
23 onRespond,
24 onAbort
25 } = t0;
26 let t1;
27 if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
28 t1 = {
29 isActive: true
30 };
31 $[0] = t1;
32 } else {
33 t1 = $[0];
34 }
35 useKeybinding("app:interrupt", onAbort, t1);
36 let t2;
37 if ($[1] !== request.options) {
38 t2 = request.options.map(_temp);
39 $[1] = request.options;
40 $[2] = t2;
41 } else {
42 t2 = $[2];
43 }
44 const options = t2;
45 let t3;
46 if ($[3] !== toolInputSummary) {
47 t3 = toolInputSummary ? <Text dimColor={true}>{toolInputSummary}</Text> : undefined;
48 $[3] = toolInputSummary;
49 $[4] = t3;
50 } else {
51 t3 = $[4];
52 }
53 let t4;
54 if ($[5] !== onRespond) {
55 t4 = value => {
56 onRespond(value);
57 };
58 $[5] = onRespond;
59 $[6] = t4;
60 } else {
61 t4 = $[6];
62 }
63 let t5;
64 if ($[7] !== options || $[8] !== t4) {
65 t5 = <Box flexDirection="column" paddingY={1}><Select options={options} onChange={t4} /></Box>;
66 $[7] = options;
67 $[8] = t4;
68 $[9] = t5;
69 } else {
70 t5 = $[9];
71 }
72 let t6;
73 if ($[10] !== request.message || $[11] !== t3 || $[12] !== t5 || $[13] !== title) {
74 t6 = <PermissionDialog title={title} subtitle={request.message} titleRight={t3}>{t5}</PermissionDialog>;

Callers

nothing calls this directly

Calls 1

useKeybindingFunction · 0.85

Tested by

no test coverage detected