mirror of
https://github.com/legop3/MultiRoombaRover.git
synced 2026-09-16 09:31:20 -04:00
gagrarh
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -11,7 +11,7 @@
|
|||||||
<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-B3XVdF7k.js"></script>
|
<script type="module" crossorigin src="/assets/index-DCMWdA-v.js"></script>
|
||||||
<link rel="stylesheet" crossorigin href="/assets/index-DSJcZoco.css">
|
<link rel="stylesheet" crossorigin href="/assets/index-DSJcZoco.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ function ProfileAvatar({ imageUrl, label }) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function ChatIdentity({ message }) {
|
export function ChatIdentity({ message, toolsToggle = null }) {
|
||||||
const discordLabel = message.fromDiscord
|
const discordLabel = message.fromDiscord
|
||||||
? `${message.discordGuildName || 'Discord'} · ${displayName(message)}`
|
? `${message.discordGuildName || 'Discord'} · ${displayName(message)}`
|
||||||
: null;
|
: null;
|
||||||
@@ -113,6 +113,7 @@ export function ChatIdentity({ message }) {
|
|||||||
{message.roverId}
|
{message.roverId}
|
||||||
</span>
|
</span>
|
||||||
)}
|
)}
|
||||||
|
{toolsToggle}
|
||||||
</span>
|
</span>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -140,24 +141,31 @@ export default function ChatMessageRow({ message }) {
|
|||||||
return (
|
return (
|
||||||
<div className={chatRowClass(message)}>
|
<div className={chatRowClass(message)}>
|
||||||
<div className="flex w-full items-center gap-0.5">
|
<div className="flex w-full items-center gap-0.5">
|
||||||
<span
|
<span className={`min-w-0 flex-1 ${isBot ? 'text-emerald-100' : 'text-slate-100'}`}>
|
||||||
className={`min-w-0 flex-1 break-words leading-tight whitespace-pre-wrap ${isBot ? 'text-emerald-100' : 'text-slate-100'}`}
|
<ChatIdentity
|
||||||
>
|
message={message}
|
||||||
<ChatIdentity message={message} />{hasText ? ` ${message.text}` : ''}
|
toolsToggle={
|
||||||
|
toolCalls.length > 0 ? (
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
className="shrink-0 rounded border border-slate-600/70 bg-slate-800/60 px-1 py-[1px] text-[0.65rem] text-slate-200 hover:bg-slate-700/70"
|
||||||
|
onClick={() => setOpen((v) => !v)}
|
||||||
|
>
|
||||||
|
{open ? '▼' : '▶'} Tools ({toolCalls.length})
|
||||||
|
</button>
|
||||||
|
) : null
|
||||||
|
}
|
||||||
|
/>
|
||||||
</span>
|
</span>
|
||||||
{toolCalls.length > 0 ? (
|
|
||||||
<button
|
|
||||||
type="button"
|
|
||||||
className="shrink-0 rounded border border-slate-600/70 bg-slate-800/60 px-1 py-[1px] text-[0.65rem] text-slate-200 hover:bg-slate-700/70"
|
|
||||||
onClick={() => setOpen((v) => !v)}
|
|
||||||
>
|
|
||||||
{open ? '▼' : '▶'} Tools ({toolCalls.length})
|
|
||||||
</button>
|
|
||||||
) : null}
|
|
||||||
<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>
|
||||||
|
{hasText ? (
|
||||||
|
<div className={`w-full break-words leading-tight whitespace-pre-wrap ${isBot ? 'text-emerald-100' : 'text-slate-100'}`}>
|
||||||
|
{message.text}
|
||||||
|
</div>
|
||||||
|
) : null}
|
||||||
{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) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user