improve session activity and model display

This commit is contained in:
Michael committed 2026-06-30 19:19:49 +02:00
1 parent a7290039f6
commit f6793daed3
6 files changed
+65 -19

No files matched your search

+22 -7
View File
@@ -11,6 +11,7 @@ export function ChatPanel() {
selectedModel,
messages,
streaming,
streamingSessionId,
streamContent,
streamThinking,
streamStatus,
@@ -22,6 +23,7 @@ export function ChatPanel() {
pendingShell,
approveShell,
rejectShell,
sessions,
} = useStore();
const activeTools = config
@@ -49,7 +51,9 @@ export function ChatPanel() {
}
};
const empty = messages.length === 0 && !streaming;
const showingStreaming = streaming && currentSessionId === streamingSessionId;
const workingSession = sessions.find((s) => s.id === streamingSessionId);
const empty = messages.length === 0 && !showingStreaming;
return (
<div className="flex min-w-0 flex-1 flex-col bg-base">
@@ -88,7 +92,7 @@ export function ChatPanel() {
{messages.map((m) => (
<Bubble key={m.id} msg={m} />
))}
{streaming && (
{showingStreaming && (
<Bubble
msg={{
id: "stream",
@@ -105,7 +109,7 @@ export function ChatPanel() {
thinking={streamThinking}
/>
)}
{pendingShell && (
{showingStreaming && pendingShell && (
<ShellConfirm
command={pendingShell}
onApprove={approveShell}
@@ -132,12 +136,23 @@ export function ChatPanel() {
<button className="flex h-8 w-8 items-center justify-center border-2 border-line text-ink-2">
<ClipIcon />
</button>
<div className="flex h-8 items-center gap-1.5 border-2 border-line px-2.5 text-[13px] text-ink-2">
<div
className="flex h-8 min-w-0 max-w-[220px] items-center gap-1.5 border-2 border-line px-2.5 text-[13px] text-ink-2"
title={selectedModel || undefined}
>
<span className="h-2 w-2 border-2 border-line bg-accent" />
{selectedModel || "—"}
<span className="min-w-0 truncate">{selectedModel || "—"}</span>
</div>
<div className="flex-1" />
<span className="text-[13px] text-muted-3">⏎ envoyer · ⇧⏎ ligne</span>
{streaming && !showingStreaming ? (
<span className="min-w-0 flex-1 truncate text-[13px] text-accent">
Travail en cours : {workingSession?.title ?? "session ouverte"}
</span>
) : (
<>
<div className="flex-1" />
<span className="text-[13px] text-muted-3">⏎ envoyer · ⇧⏎ ligne</span>
</>
)}
<button
onClick={submit}
disabled={streaming || !draft.trim()}
+10
View File
@@ -8,6 +8,7 @@ export function LeftPanel() {
const {
sessions,
currentSessionId,
streamingSessionId,
refreshSessions,
refreshFiles,
fileTree,
@@ -43,6 +44,7 @@ export function LeftPanel() {
)}
{sessions.map((s) => {
const active = s.id === currentSessionId;
const working = s.id === streamingSessionId;
return (
<div
key={s.id}
@@ -60,6 +62,14 @@ export function LeftPanel() {
>
{s.title}
</div>
{working && (
<span
className="flex-none border-2 border-line bg-accent px-1.5 py-0.5 text-[10px] leading-none text-white"
title="Session en cours de travail"
>
EN COURS
</span>
)}
<button
onClick={(e) => {
e.stopPropagation();