The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 21, 04:45 UTC
| 1 | import type { ReactNode } from "react"; |
| 2 | |
| 3 | import { InlineButton } from "../ui/button"; |
| 4 | |
| 5 | export function ThreadStatusLine(props: { |
| 6 | readonly icon: ReactNode; |
| 7 | readonly label: string; |
| 8 | readonly actionLabel: string; |
| 9 | readonly actionDisabled?: boolean; |
| 10 | readonly onAction: () => void; |
| 11 | // Set for clock-dependent labels to trigger updates. |
| 12 | readonly clockMinute?: string; |
| 13 | }) { |
| 14 | return ( |
| 15 | <div |
| 16 | data-chat-thread-status-line="true" |
| 17 | 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" |
| 18 | > |
| 19 | {props.icon} |
| 20 | <span className="min-w-0 truncate">{props.label}</span> |
| 21 | <span aria-hidden="true">·</span> |
| 22 | <InlineButton disabled={props.actionDisabled} onClick={props.onAction}> |
| 23 | {props.actionLabel} |
| 24 | </InlineButton> |
| 25 | </div> |
| 26 | ); |
| 27 | } |