This commit is contained in:
legop3
2026-05-19 18:41:55 -04:00
parent 084dee4df9
commit 51d8c72ae8
5 changed files with 42 additions and 38 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+2 -2
View File
@@ -11,8 +11,8 @@
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" /> <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<meta name="apple-mobile-web-app-title" content="Roomba Rover" /> <meta name="apple-mobile-web-app-title" content="Roomba Rover" />
<title>Roomba Rover</title> <title>Roomba Rover</title>
<script type="module" crossorigin src="/assets/index-DHAX2YQZ.js"></script> <script type="module" crossorigin src="/assets/index-B37uweYW.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-CVBRlegx.css"> <link rel="stylesheet" crossorigin href="/assets/index-DSJcZoco.css">
</head> </head>
<body> <body>
<div id="root"></div> <div id="root"></div>
+21 -17
View File
@@ -138,13 +138,7 @@ export default function ChatMessageRow({ message }) {
const [open, setOpen] = useState(false); const [open, setOpen] = useState(false);
const toolCalls = Array.isArray(message?.toolCalls) ? message.toolCalls : []; const toolCalls = Array.isArray(message?.toolCalls) ? message.toolCalls : [];
const hasText = Boolean(String(message?.text || '').trim()); const hasText = Boolean(String(message?.text || '').trim());
return ( const toolsToggle =
<div className={chatRowClass(message)}>
<div className="grid w-full grid-cols-[auto,1fr,auto] items-center gap-0.5">
<span className={`min-w-0 ${isBot ? 'text-emerald-100' : 'text-slate-100'}`}>
<ChatIdentity
message={message}
toolsToggle={
toolCalls.length > 0 ? ( toolCalls.length > 0 ? (
<button <button
type="button" type="button"
@@ -153,21 +147,31 @@ export default function ChatMessageRow({ message }) {
> >
{open ? '▼' : '▶'} Tools ({toolCalls.length}) {open ? '▼' : '▶'} Tools ({toolCalls.length})
</button> </button>
) : null ) : null;
} return (
/> <div className={chatRowClass(message)}>
{!open ? (
<div className="flex w-full items-start gap-0.5">
<span
className={`min-w-0 flex-1 break-words leading-tight whitespace-pre-wrap ${isBot ? 'text-emerald-100' : 'text-slate-100'}`}
>
<ChatIdentity message={message} toolsToggle={toolsToggle} />
{hasText ? ` ${message.text}` : ''}
</span> </span>
{!open && hasText ? (
<span className={`min-w-0 break-words leading-tight whitespace-pre-wrap ${isBot ? 'text-emerald-100' : 'text-slate-100'}`}>
{message.text}
</span>
) : (
<span />
)}
<span className="shrink-0 text-[0.65rem] text-slate-400/60"> <span className="shrink-0 text-[0.65rem] text-slate-400/60">
{formatTime(message.ts)} {formatTime(message.ts)}
</span> </span>
</div> </div>
) : (
<div className="flex w-full items-start gap-0.5">
<span className={`min-w-0 flex-1 ${isBot ? 'text-emerald-100' : 'text-slate-100'}`}>
<ChatIdentity message={message} toolsToggle={toolsToggle} />
</span>
<span className="shrink-0 text-[0.65rem] text-slate-400/60">
{formatTime(message.ts)}
</span>
</div>
)}
{open && toolCalls.length > 0 ? ( {open && toolCalls.length > 0 ? (
<div className="w-full rounded border border-slate-700/70 bg-slate-900/70 p-0.5 text-[0.68rem] text-slate-200"> <div className="w-full rounded border border-slate-700/70 bg-slate-900/70 p-0.5 text-[0.68rem] text-slate-200">
{toolCalls.map((entry, idx) => { {toolCalls.map((entry, idx) => {