| 1 | import { |
| 2 | LLMInteractionCancel, |
| 3 | LLMInteractionError, |
| 4 | LLMInteractionSuccess, |
| 5 | } from "core"; |
| 6 | import Expander from "./Expander"; |
| 7 | import Message from "./Message"; |
| 8 | |
| 9 | export interface StartProps { |
| 10 | item: LLMInteractionSuccess | LLMInteractionError | LLMInteractionCancel; |
| 11 | } |
| 12 | |
| 13 | export default function Start({ item }: StartProps) { |
| 14 | // <div className="border-0 border-b-2 border-solid border-[color:var(--vscode-panel-border)]"> |
| 15 | switch (item.kind) { |
| 16 | case "success": |
| 17 | return <></>; |
| 18 | case "error": |
| 19 | return ( |
| 20 | <div> |
| 21 | <span className="text-[color:var(--vscode-statusBarItem-errorForeground) m-0.5 inline-block rounded-sm bg-[color:var(--vscode-statusBarItem-errorBackground)] p-0.5"> |
| 22 | Error |
| 23 | </span> |
| 24 | {item.message} |
| 25 | </div> |
| 26 | ); |
| 27 | break; |
| 28 | case "cancel": |
| 29 | return ( |
| 30 | <div> |
| 31 | <span className="text-[color:var(--vscode-statusBarItem-warningForeground) m-0.5 inline-block rounded-sm bg-[color:var(--vscode-statusBarItem-warningBackground)] p-0.5"> |
| 32 | Cancelled |
| 33 | </span> |
| 34 | </div> |
| 35 | ); |
| 36 | } |
| 37 | } |