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

Function SummaryPill

src/components/tasks/BackgroundTaskStatus.tsx:378–421  ·  view source on GitHub ↗
(t0)

Source from the content-addressed store, hash-verified

376 return t3;
377}
378function SummaryPill(t0) {
379 const $ = _c(8);
380 const {
381 selected,
382 onClick,
383 children
384 } = t0;
385 const [hover, setHover] = useState(false);
386 const t1 = selected || hover;
387 let t2;
388 if ($[0] !== children || $[1] !== t1) {
389 t2 = <Text color="background" inverse={t1}>{children}</Text>;
390 $[0] = children;
391 $[1] = t1;
392 $[2] = t2;
393 } else {
394 t2 = $[2];
395 }
396 const label = t2;
397 if (!onClick) {
398 return label;
399 }
400 let t3;
401 let t4;
402 if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
403 t3 = () => setHover(true);
404 t4 = () => setHover(false);
405 $[3] = t3;
406 $[4] = t4;
407 } else {
408 t3 = $[3];
409 t4 = $[4];
410 }
411 let t5;
412 if ($[5] !== label || $[6] !== onClick) {
413 t5 = <Box onClick={onClick} onMouseEnter={t3} onMouseLeave={t4}>{label}</Box>;
414 $[5] = label;
415 $[6] = onClick;
416 $[7] = t5;
417 } else {
418 t5 = $[7];
419 }
420 return t5;
421}
422function getAgentThemeColor(colorName: string | undefined): keyof Theme | undefined {
423 if (!colorName) return undefined;
424 if (AGENT_COLORS.includes(colorName as AgentColorName)) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected