mirror of
https://github.com/legop3/MultiRoombaRover.git
synced 2026-09-15 17:12:59 -04:00
larger chat scalee!!! and chat row fixes too :3
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-CJN0MGvr.js"></script>
|
<script type="module" crossorigin src="/assets/index-CjC9M_J1.js"></script>
|
||||||
<link rel="stylesheet" crossorigin href="/assets/index-D6YORRLd.css">
|
<link rel="stylesheet" crossorigin href="/assets/index-D6YORRLd.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ function displayName(message) {
|
|||||||
// height, while the matching calc() size keeps the avatar square after adding that
|
// height, while the matching calc() size keeps the avatar square after adding that
|
||||||
// top/bottom coverage.
|
// top/bottom coverage.
|
||||||
const CHAT_ROW_FULL_HEIGHT_AVATAR_CLASS =
|
const CHAT_ROW_FULL_HEIGHT_AVATAR_CLASS =
|
||||||
'my-[-0.125rem] flex h-[calc(1rem+0.25rem)] w-[calc(1rem+0.25rem)] shrink-0 overflow-hidden rounded-none'
|
'my-[-0.125rem] flex h-[calc(1rem+0.25rem)] w-[calc(1rem+0.25rem)] shrink-0 overflow-hidden rounded-none';
|
||||||
|
|
||||||
function DiscordAvatar({ guildIconUrl, userAvatarUrl, label }) {
|
function DiscordAvatar({ guildIconUrl, userAvatarUrl, label }) {
|
||||||
if (!guildIconUrl && !userAvatarUrl) return null;
|
if (!guildIconUrl && !userAvatarUrl) return null;
|
||||||
@@ -48,6 +48,11 @@ function DiscordAvatar({ guildIconUrl, userAvatarUrl, label }) {
|
|||||||
title={label}
|
title={label}
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
|
// Empty Discord icon halves stay transparent so missing image data does
|
||||||
|
// not draw a boxed placeholder behind the remaining chat row identity.
|
||||||
|
// The half-width spans are still kept because a Discord identity may
|
||||||
|
// provide only one side of the combined guild/user avatar, and preserving
|
||||||
|
// the split layout avoids changing the icon footprint between states.
|
||||||
className={`h-full w-1/2 ${guildIconUrl ? 'bg-cover' : ''}`}
|
className={`h-full w-1/2 ${guildIconUrl ? 'bg-cover' : ''}`}
|
||||||
style={
|
style={
|
||||||
guildIconUrl
|
guildIconUrl
|
||||||
@@ -60,7 +65,10 @@ function DiscordAvatar({ guildIconUrl, userAvatarUrl, label }) {
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
<span
|
<span
|
||||||
className={`h-full w-1/2${userAvatarUrl ? 'bg-cover' : ''}`}
|
// This side mirrors the guild half above: transparent when absent, but
|
||||||
|
// still occupying half the avatar slot so partial Discord avatar data
|
||||||
|
// does not cause the rendered identity row to shift horizontally.
|
||||||
|
className={`h-full w-1/2 ${userAvatarUrl ? 'bg-cover' : ''}`}
|
||||||
style={
|
style={
|
||||||
userAvatarUrl
|
userAvatarUrl
|
||||||
? {
|
? {
|
||||||
@@ -150,11 +158,17 @@ export default function ChatMessageRow({ message }) {
|
|||||||
const role = useSessionSelector((state) => state.session?.role || null);
|
const role = useSessionSelector((state) => state.session?.role || null);
|
||||||
const isSpectator = role === 'spectator';
|
const isSpectator = role === 'spectator';
|
||||||
const [open, setOpen] = useState(false);
|
const [open, setOpen] = useState(false);
|
||||||
const isOpen = isSpectator || open;
|
|
||||||
const toolCalls = Array.isArray(message?.toolCalls) ? message.toolCalls : [];
|
const toolCalls = Array.isArray(message?.toolCalls) ? message.toolCalls : [];
|
||||||
|
const hasToolCalls = toolCalls.length > 0;
|
||||||
|
// Spectator chat should expose tool details without requiring interaction, but
|
||||||
|
// only rows that actually contain tools need the expanded two-section layout.
|
||||||
|
// Without this guard, ordinary spectator chat messages render the sender and
|
||||||
|
// message body on separate lines simply because the spectator role forces the
|
||||||
|
// row open even when there is no dropdown content to show.
|
||||||
|
const isOpen = hasToolCalls && (isSpectator || open);
|
||||||
const hasText = Boolean(String(message?.text || '').trim());
|
const hasText = Boolean(String(message?.text || '').trim());
|
||||||
const toolsToggle =
|
const toolsToggle =
|
||||||
toolCalls.length > 0 ? (
|
hasToolCalls ? (
|
||||||
<button
|
<button
|
||||||
type="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"
|
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"
|
||||||
@@ -179,7 +193,7 @@ export default function ChatMessageRow({ message }) {
|
|||||||
{formatTime(message.ts)}
|
{formatTime(message.ts)}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
{isOpen && toolCalls.length > 0 ? (
|
{isOpen && hasToolCalls ? (
|
||||||
<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) => {
|
||||||
const status = String(entry?.status || 'unknown');
|
const status = String(entry?.status || 'unknown');
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
import ChatPanel from '../../../components/ChatPanel/index.jsx';
|
import ChatPanel from '../../../components/ChatPanel/index.jsx';
|
||||||
|
|
||||||
export default function DisplayChatFeed() {
|
export default function DisplayChatFeed() {
|
||||||
const displayChatScale = 3.75;
|
const displayChatScale = 4.6;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<section className="h-full min-h-0 overflow-hidden border-t border-slate-800 bg-black p-[0.45vw]">
|
<section className="h-full min-h-0 overflow-hidden border-t border-slate-800 bg-black p-[0.45vw]">
|
||||||
|
|||||||
Reference in New Issue
Block a user