Elffuss BraidHub

kikocis/continue public

main · 1.1 KiBRawPermalink
1import {
2 CheckIcon,
3 EllipsisHorizontalIcon,
4 StopCircleIcon,
5 XCircleIcon,
6} from "@heroicons/react/24/outline";
7import { LLMInteraction } from "../../hooks/useLLMLog";
8
9export interface StatusIconProps {
10 interaction: LLMInteraction;
11}
12
13export 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}