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

Function SessionInfo

src/commands/session/session.tsx:14–124  ·  view source on GitHub ↗
(t0)

Source from the content-addressed store, hash-verified

12 onDone: () => void;
13};
14function SessionInfo(t0) {
15 const $ = _c(19);
16 const {
17 onDone
18 } = t0;
19 const remoteSessionUrl = useAppState(_temp);
20 const [qrCode, setQrCode] = useState("");
21 let t1;
22 let t2;
23 if ($[0] !== remoteSessionUrl) {
24 t1 = () => {
25 if (!remoteSessionUrl) {
26 return;
27 }
28 const url = remoteSessionUrl;
29 const generateQRCode = async function generateQRCode() {
30 const qr = await qrToString(url, {
31 type: "utf8",
32 errorCorrectionLevel: "L"
33 });
34 setQrCode(qr);
35 };
36 generateQRCode().catch(_temp2);
37 };
38 t2 = [remoteSessionUrl];
39 $[0] = remoteSessionUrl;
40 $[1] = t1;
41 $[2] = t2;
42 } else {
43 t1 = $[1];
44 t2 = $[2];
45 }
46 useEffect(t1, t2);
47 let t3;
48 if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
49 t3 = {
50 context: "Confirmation"
51 };
52 $[3] = t3;
53 } else {
54 t3 = $[3];
55 }
56 useKeybinding("confirm:no", onDone, t3);
57 if (!remoteSessionUrl) {
58 let t4;
59 if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
60 t4 = <Pane><Text color="warning">Not in remote mode. Start with `claude --remote` to use this command.</Text><Text dimColor={true}>(press esc to close)</Text></Pane>;
61 $[4] = t4;
62 } else {
63 t4 = $[4];
64 }
65 return t4;
66 }
67 let T0;
68 let t4;
69 let t5;
70 if ($[5] !== qrCode) {
71 const lines = qrCode.split("\n").filter(_temp3);

Callers

nothing calls this directly

Calls 3

useAppStateFunction · 0.85
generateQRCodeFunction · 0.85
useKeybindingFunction · 0.85

Tested by

no test coverage detected