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

Function AgentPill

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

Source from the content-addressed store, hash-verified

286 onClick?: () => void;
287};
288function AgentPill(t0) {
289 const $ = _c(19);
290 const {
291 name,
292 color,
293 isSelected,
294 isViewed,
295 isIdle,
296 onClick
297 } = t0;
298 const [hover, setHover] = useState(false);
299 const highlighted = isSelected || hover;
300 let label;
301 if (highlighted) {
302 let t1;
303 if ($[0] !== color || $[1] !== isViewed || $[2] !== name) {
304 t1 = color ? <Text backgroundColor={color} color="inverseText" bold={isViewed}>@{name}</Text> : <Text color="background" inverse={true} bold={isViewed}>@{name}</Text>;
305 $[0] = color;
306 $[1] = isViewed;
307 $[2] = name;
308 $[3] = t1;
309 } else {
310 t1 = $[3];
311 }
312 label = t1;
313 } else {
314 if (isIdle) {
315 let t1;
316 if ($[4] !== isViewed || $[5] !== name) {
317 t1 = <Text dimColor={true} bold={isViewed}>@{name}</Text>;
318 $[4] = isViewed;
319 $[5] = name;
320 $[6] = t1;
321 } else {
322 t1 = $[6];
323 }
324 label = t1;
325 } else {
326 if (isViewed) {
327 let t1;
328 if ($[7] !== color || $[8] !== name) {
329 t1 = <Text color={color} bold={true}>@{name}</Text>;
330 $[7] = color;
331 $[8] = name;
332 $[9] = t1;
333 } else {
334 t1 = $[9];
335 }
336 label = t1;
337 } else {
338 const t1 = !color;
339 let t2;
340 if ($[10] !== color || $[11] !== name || $[12] !== t1) {
341 t2 = <Text color={color} dimColor={t1}>@{name}</Text>;
342 $[10] = color;
343 $[11] = name;
344 $[12] = t1;
345 $[13] = t2;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected