MCPcopy Create free account
hub / github.com/codeaashu/claude-code / BridgeDisconnectDialog

Function BridgeDisconnectDialog

src/commands/bridge/bridge.tsx:155–424  ·  view source on GitHub ↗
(t0)

Source from the content-addressed store, hash-verified

153 return s.replBridgeConnected;
154}
155function BridgeDisconnectDialog(t0) {
156 const $ = _c(61);
157 const {
158 onDone
159 } = t0;
160 useRegisterOverlay("bridge-disconnect-dialog");
161 const setAppState = useSetAppState();
162 const sessionUrl = useAppState(_temp4);
163 const connectUrl = useAppState(_temp5);
164 const sessionActive = useAppState(_temp6);
165 const [focusIndex, setFocusIndex] = useState(2);
166 const [showQR, setShowQR] = useState(false);
167 const [qrText, setQrText] = useState("");
168 const displayUrl = sessionActive ? sessionUrl : connectUrl;
169 let t1;
170 let t2;
171 if ($[0] !== displayUrl || $[1] !== showQR) {
172 t1 = () => {
173 if (!showQR || !displayUrl) {
174 setQrText("");
175 return;
176 }
177 qrToString(displayUrl, {
178 type: "utf8",
179 errorCorrectionLevel: "L",
180 small: true
181 }).then(setQrText).catch(() => setQrText(""));
182 };
183 t2 = [showQR, displayUrl];
184 $[0] = displayUrl;
185 $[1] = showQR;
186 $[2] = t1;
187 $[3] = t2;
188 } else {
189 t1 = $[2];
190 t2 = $[3];
191 }
192 useEffect(t1, t2);
193 let t3;
194 if ($[4] !== onDone || $[5] !== setAppState) {
195 t3 = function handleDisconnect() {
196 setAppState(_temp7);
197 logEvent("tengu_bridge_command", {
198 action: "disconnect" as AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS
199 });
200 onDone(REMOTE_CONTROL_DISCONNECTED_MSG, {
201 display: "system"
202 });
203 };
204 $[4] = onDone;
205 $[5] = setAppState;
206 $[6] = t3;
207 } else {
208 t3 = $[6];
209 }
210 const handleDisconnect = t3;
211 let t4;
212 if ($[7] === Symbol.for("react.memo_cache_sentinel")) {

Callers

nothing calls this directly

Calls 6

useRegisterOverlayFunction · 0.85
useSetAppStateFunction · 0.85
useAppStateFunction · 0.85
logEventFunction · 0.85
useKeybindingsFunction · 0.85
onDoneFunction · 0.50

Tested by

no test coverage detected