refactor: move agent version from setup row to session header

This commit is contained in:
Nathan Flurry 2026-01-27 19:53:37 -08:00
parent 308d7f279c
commit 19f561de52
3 changed files with 12 additions and 16 deletions

View file

@ -623,6 +623,12 @@
border-radius: 999px;
}
.session-agent-version {
font-weight: 500;
opacity: 0.7;
margin-left: 4px;
}
.panel-header-right {
display: flex;
align-items: center;

View file

@ -123,7 +123,12 @@ const ChatPanel = ({
<MessageSquare className="button-icon" />
<span className="panel-title">{sessionId ? "Session" : "No Session"}</span>
{sessionId && <span className="session-id-display">{sessionId}</span>}
{sessionId && <span className="session-agent-display">{agentLabel}</span>}
{sessionId && (
<span className="session-agent-display">
{agentLabel}
{currentAgentVersion && <span className="session-agent-version">v{currentAgentVersion}</span>}
</span>
)}
</div>
<div className="panel-header-right">
<div className="setup-stream">
@ -244,13 +249,11 @@ const ChatPanel = ({
/>
<ChatSetup
agentLabel={agentLabel}
agentMode={agentMode}
permissionMode={permissionMode}
model={model}
variant={variant}
activeModes={activeModes}
currentAgentVersion={currentAgentVersion}
modesLoading={modesLoading}
modesError={modesError}
onAgentModeChange={onAgentModeChange}

View file

@ -1,13 +1,11 @@
import type { AgentModeInfo } from "sandbox-agent";
const ChatSetup = ({
agentLabel,
agentMode,
permissionMode,
model,
variant,
activeModes,
currentAgentVersion,
hasSession,
modesLoading,
modesError,
@ -16,13 +14,11 @@ const ChatSetup = ({
onModelChange,
onVariantChange
}: {
agentLabel: string;
agentMode: string;
permissionMode: string;
model: string;
variant: string;
activeModes: AgentModeInfo[];
currentAgentVersion?: string | null;
hasSession: boolean;
modesLoading: boolean;
modesError: string | null;
@ -31,9 +27,6 @@ const ChatSetup = ({
onModelChange: (value: string) => void;
onVariantChange: (value: string) => void;
}) => {
const agentVersionLabel = currentAgentVersion
? `${agentLabel} v${currentAgentVersion}`
: agentLabel;
return (
<div className="setup-row">
<select
@ -87,12 +80,6 @@ const ChatSetup = ({
title="Variant"
disabled={!hasSession}
/>
{hasSession && (
<span className="setup-version" title="Session agent">
{agentVersionLabel}
</span>
)}
</div>
);
};