diff --git a/apps/web/src/components/hq/HQWaitingForInputSection.tsx b/apps/web/src/components/hq/HQWaitingForInputSection.tsx new file mode 100644 index 0000000..9add7e8 --- /dev/null +++ b/apps/web/src/components/hq/HQWaitingForInputSection.tsx @@ -0,0 +1,69 @@ +import { useNavigate } from '@tanstack/react-router' +import { Card } from '@/components/ui/card' +import { Button } from '@/components/ui/button' +import { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider } from '@/components/ui/tooltip' +import { formatRelativeTime } from '@/lib/utils' +import type { WaitingForInputItem } from './types' + +interface Props { + items: WaitingForInputItem[] +} + +const TRUNCATE_LENGTH = 120 + +export function HQWaitingForInputSection({ items }: Props) { + const navigate = useNavigate() + + return ( +
+

+ Waiting for Input +

+
+ {items.map((item) => { + const isTruncated = item.questionText.length > TRUNCATE_LENGTH + const displayText = isTruncated + ? item.questionText.slice(0, TRUNCATE_LENGTH) + '…' + : item.questionText + + return ( + +
+

+ {item.agentName} + {item.initiativeId && item.initiativeName && ( + · {item.initiativeName} + )} +

+ + + +

+ {displayText} +

+
+ {isTruncated && ( + + {item.questionText} + + )} +
+
+

+ waiting {formatRelativeTime(item.waitingSince)} +

+
+ +
+ ) + })} +
+
+ ) +}