Open History to see the last commit
1import type { ReactNode } from "react";
2
3import { InlineButton } from "../ui/button";
4
5export function ThreadStatusLine(props: {
6 readonly icon: ReactNode;
7 readonly label: string;
8 readonly actionLabel: string;
9 readonly actionDisabled?: boolean;
10 readonly onAction: () => void;
11}) {
12 return (
13 <div
14 data-chat-thread-status-line="true"
15 className="mx-auto flex w-full min-w-0 max-w-(--chat-content-max-width) items-center gap-1.5 px-1 pb-2 text-muted-foreground text-xs [&_svg]:size-3.5 [&_svg]:shrink-0"
16 >
17 {props.icon}
18 <span className="min-w-0 truncate">{props.label}</span>
19 <span aria-hidden="true">·</span>
20 <InlineButton tone="muted" disabled={props.actionDisabled} onClick={props.onAction}>
21 {props.actionLabel}
22 </InlineButton>
23 </div>
24 );
25}