(t0)
| 18 | onSelect: (log: LogOption) => void; |
| 19 | }; |
| 20 | export function SessionPreview(t0) { |
| 21 | const $ = _c(33); |
| 22 | const { |
| 23 | log, |
| 24 | onExit, |
| 25 | onSelect |
| 26 | } = t0; |
| 27 | const [fullLog, setFullLog] = React.useState(null); |
| 28 | let t1; |
| 29 | let t2; |
| 30 | if ($[0] !== log) { |
| 31 | t1 = () => { |
| 32 | setFullLog(null); |
| 33 | if (isLiteLog(log)) { |
| 34 | loadFullLog(log).then(setFullLog); |
| 35 | } |
| 36 | }; |
| 37 | t2 = [log]; |
| 38 | $[0] = log; |
| 39 | $[1] = t1; |
| 40 | $[2] = t2; |
| 41 | } else { |
| 42 | t1 = $[1]; |
| 43 | t2 = $[2]; |
| 44 | } |
| 45 | React.useEffect(t1, t2); |
| 46 | const isLoading = isLiteLog(log) && fullLog === null; |
| 47 | const displayLog = fullLog ?? log; |
| 48 | let t3; |
| 49 | if ($[3] !== displayLog) { |
| 50 | t3 = getSessionIdFromLog(displayLog) || "" as UUID; |
| 51 | $[3] = displayLog; |
| 52 | $[4] = t3; |
| 53 | } else { |
| 54 | t3 = $[4]; |
| 55 | } |
| 56 | const conversationId = t3; |
| 57 | let t4; |
| 58 | if ($[5] === Symbol.for("react.memo_cache_sentinel")) { |
| 59 | t4 = getAllBaseTools(); |
| 60 | $[5] = t4; |
| 61 | } else { |
| 62 | t4 = $[5]; |
| 63 | } |
| 64 | const tools = t4; |
| 65 | let t5; |
| 66 | if ($[6] === Symbol.for("react.memo_cache_sentinel")) { |
| 67 | t5 = { |
| 68 | context: "Confirmation" |
| 69 | }; |
| 70 | $[6] = t5; |
| 71 | } else { |
| 72 | t5 = $[6]; |
| 73 | } |
| 74 | useKeybinding("confirm:no", onExit, t5); |
| 75 | let t6; |
| 76 | if ($[7] !== fullLog || $[8] !== log || $[9] !== onSelect) { |
| 77 | t6 = () => { |
nothing calls this directly
no test coverage detected