| 1 | import { |
| 2 | CheckIcon, |
| 3 | EllipsisHorizontalIcon, |
| 4 | StopCircleIcon, |
| 5 | XCircleIcon, |
| 6 | } from "@heroicons/react/24/outline"; |
| 7 | import { LLMInteraction } from "../../hooks/useLLMLog"; |
| 8 | |
| 9 | export interface StatusIconProps { |
| 10 | interaction: LLMInteraction; |
| 11 | } |
| 12 | |
| 13 | export default function StatusIcon({ interaction }: StatusIconProps) { |
| 14 | if (interaction.end) { |
| 15 | switch (interaction.end.kind) { |
| 16 | case "success": |
| 17 | return ( |
| 18 | <CheckIcon className="relative top-[2px] -mt-[2px] h-[16px] w-[16px] pr-[2px] text-[color:var(--vscode-charts-green)]" /> |
| 19 | ); |
| 20 | case "cancel": |
| 21 | return ( |
| 22 | <StopCircleIcon className="relative top-[2px] -mt-[2px] h-[16px] w-[16px] pr-[2px] text-[color:var(--vscode-list-warningForeground)]" /> |
| 23 | ); |
| 24 | case "error": |
| 25 | return ( |
| 26 | <XCircleIcon className="relative top-[2px] -mt-[2px] h-[16px] w-[16px] pr-[2px] text-[color:var(--vscode-list-errorForeground)]" /> |
| 27 | ); |
| 28 | } |
| 29 | } else { |
| 30 | return ( |
| 31 | <EllipsisHorizontalIcon className="relative top-[2px] -mt-[2px] h-[16px] w-[16px] pr-[2px]" /> |
| 32 | ); |
| 33 | } |
| 34 | } |