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

Function BridgeDialog

src/components/BridgeDialog.tsx:20–342  ·  view source on GitHub ↗
(t0)

Source from the content-addressed store, hash-verified

18 onDone: () => void;
19};
20export function BridgeDialog(t0) {
21 const $ = _c(87);
22 const {
23 onDone
24 } = t0;
25 useRegisterOverlay("bridge-dialog");
26 const connected = useAppState(_temp);
27 const sessionActive = useAppState(_temp2);
28 const reconnecting = useAppState(_temp3);
29 const connectUrl = useAppState(_temp4);
30 const sessionUrl = useAppState(_temp5);
31 const error = useAppState(_temp6);
32 const explicit = useAppState(_temp7);
33 const environmentId = useAppState(_temp8);
34 const sessionId = useAppState(_temp9);
35 const verbose = useAppState(_temp0);
36 const setAppState = useSetAppState();
37 const [showQR, setShowQR] = useState(false);
38 const [qrText, setQrText] = useState("");
39 const [branchName, setBranchName] = useState("");
40 let t1;
41 if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
42 t1 = basename(getOriginalCwd());
43 $[0] = t1;
44 } else {
45 t1 = $[0];
46 }
47 const repoName = t1;
48 let t2;
49 let t3;
50 if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
51 t2 = () => {
52 getBranch().then(setBranchName).catch(_temp1);
53 };
54 t3 = [];
55 $[1] = t2;
56 $[2] = t3;
57 } else {
58 t2 = $[1];
59 t3 = $[2];
60 }
61 useEffect(t2, t3);
62 const displayUrl = sessionActive ? sessionUrl : connectUrl;
63 let t4;
64 let t5;
65 if ($[3] !== displayUrl || $[4] !== showQR) {
66 t4 = () => {
67 if (!showQR || !displayUrl) {
68 setQrText("");
69 return;
70 }
71 qrToString(displayUrl, {
72 type: "utf8",
73 errorCorrectionLevel: "L",
74 small: true
75 }).then(setQrText).catch(() => setQrText(""));
76 };
77 t5 = [showQR, displayUrl];

Callers

nothing calls this directly

Calls 13

useRegisterOverlayFunction · 0.85
useAppStateFunction · 0.85
useSetAppStateFunction · 0.85
getOriginalCwdFunction · 0.85
getBranchFunction · 0.85
useKeybindingsFunction · 0.85
saveGlobalConfigFunction · 0.85
useInputFunction · 0.85
getBridgeStatusFunction · 0.85
buildActiveFooterTextFunction · 0.85
buildIdleFooterTextFunction · 0.85
onDoneFunction · 0.50

Tested by

no test coverage detected