feat: optimistic message rendering with send status indicators
- User messages appear instantly with 'sending' state (dimmed, clock icon) - Transitions to 'sent' (checkmark) when server acknowledges - Shows error state (alert icon, retry visible) if send fails - Applied to both primary and secondary sessions
This commit is contained in:
@@ -370,7 +370,7 @@ export function Sidebar({ sessions, activeSession, onSwitch, onDelete, onSplit,
|
||||
if (!s.contextTokens) return null;
|
||||
const pct = Math.min(100, ((s.totalTokens || 0) / s.contextTokens) * 100);
|
||||
const barOpacity = Math.max(0.35, Math.min(1, pct / 100));
|
||||
const barStyle = { width: `${pct}%`, backgroundColor: `rgba(56, 189, 248, ${barOpacity})` };
|
||||
const barStyle = { width: `${pct}%`, backgroundColor: `rgba(var(--pc-accent-rgb), ${barOpacity})` };
|
||||
return (
|
||||
<div className="flex items-center gap-1.5 mt-1">
|
||||
<div className="flex-1 h-[3px] rounded-full bg-[var(--pc-hover)] overflow-hidden">
|
||||
|
||||
Reference in New Issue
Block a user