MCPcopy Index your code
hub / github.com/codeaashu/claude-code / DreamDetailDialog

Function DreamDetailDialog

src/components/tasks/DreamDetailDialog.tsx:22–244  ·  view source on GitHub ↗
(t0)

Source from the content-addressed store, hash-verified

20// How many recent turns to render. Earlier turns collapse to a count.
21const VISIBLE_TURNS = 6;
22export function DreamDetailDialog(t0) {
23 const $ = _c(70);
24 const {
25 task,
26 onDone,
27 onBack,
28 onKill
29 } = t0;
30 const elapsedTime = useElapsedTime(task.startTime, task.status === "running", 1000, 0);
31 let t1;
32 if ($[0] !== onDone) {
33 t1 = {
34 "confirm:yes": onDone
35 };
36 $[0] = onDone;
37 $[1] = t1;
38 } else {
39 t1 = $[1];
40 }
41 let t2;
42 if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
43 t2 = {
44 context: "Confirmation"
45 };
46 $[2] = t2;
47 } else {
48 t2 = $[2];
49 }
50 useKeybindings(t1, t2);
51 let t3;
52 if ($[3] !== onBack || $[4] !== onDone || $[5] !== onKill || $[6] !== task.status) {
53 t3 = e => {
54 if (e.key === " ") {
55 e.preventDefault();
56 onDone();
57 } else {
58 if (e.key === "left" && onBack) {
59 e.preventDefault();
60 onBack();
61 } else {
62 if (e.key === "x" && task.status === "running" && onKill) {
63 e.preventDefault();
64 onKill();
65 }
66 }
67 }
68 };
69 $[3] = onBack;
70 $[4] = onDone;
71 $[5] = onKill;
72 $[6] = task.status;
73 $[7] = t3;
74 } else {
75 t3 = $[7];
76 }
77 const handleKeyDown = t3;
78 let T0;
79 let T1;

Callers

nothing calls this directly

Calls 5

useElapsedTimeFunction · 0.85
useKeybindingsFunction · 0.85
pluralFunction · 0.85
preventDefaultMethod · 0.80
onDoneFunction · 0.50

Tested by

no test coverage detected