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; border-radius: 999px;
} }
.session-agent-version {
font-weight: 500;
opacity: 0.7;
margin-left: 4px;
}
.panel-header-right { .panel-header-right {
display: flex; display: flex;
align-items: center; align-items: center;

View file

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

View file

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