@@ -158,7 +158,11 @@ import {
158158import { ProjectFavicon } from "./ProjectFavicon" ;
159159import { ProviderInstanceIcon } from "./chat/ProviderInstanceIcon" ;
160160import { getTriggerDisplayModelLabel } from "./chat/providerIconUtils" ;
161- import { deriveProviderInstanceEntries , type ProviderInstanceEntry } from "../providerInstances" ;
161+ import {
162+ deriveProviderInstanceEntries ,
163+ shouldShowInstanceBadge ,
164+ type ProviderInstanceEntry ,
165+ } from "../providerInstances" ;
162166import { primaryServerProvidersAtom } from "../state/server" ;
163167import { useThreadRunningTerminalIds } from "../state/terminalSessions" ;
164168import { stackedThreadToast , toastManager } from "./ui/toast" ;
@@ -247,7 +251,8 @@ function SidebarThreadTooltip({
247251 projectCwd,
248252 projectFaviconPath,
249253 environmentLabel,
250- driverKind,
254+ providerEntry,
255+ showInstanceBadge,
251256 modelInstanceId,
252257 modelLabel,
253258 branchMismatch,
@@ -259,7 +264,8 @@ function SidebarThreadTooltip({
259264 projectCwd : string | null ;
260265 projectFaviconPath : string | null ;
261266 environmentLabel : string | null ;
262- driverKind : ProviderInstanceEntry [ "driverKind" ] | null ;
267+ providerEntry : ProviderInstanceEntry | null ;
268+ showInstanceBadge : boolean ;
263269 modelInstanceId : string ;
264270 modelLabel : string ;
265271 branchMismatch : {
@@ -269,6 +275,7 @@ function SidebarThreadTooltip({
269275 terminalStatus : TerminalStatusIndicator | null ;
270276 terminalProcessCount : number ;
271277} ) {
278+ const driverKind = providerEntry ?. driverKind ?? null ;
272279 return (
273280 < TooltipPopup
274281 side = "right"
@@ -317,10 +324,21 @@ function SidebarThreadTooltip({
317324 < div className = "flex min-w-0 items-center gap-2" >
318325 < ProviderInstanceIcon
319326 driverKind = { driverKind }
320- displayName = { thread . session ?. providerName ?? modelInstanceId }
327+ displayName = {
328+ providerEntry ?. displayName ?? thread . session ?. providerName ?? modelInstanceId
329+ }
330+ accentColor = { providerEntry ?. accentColor }
331+ // Initials would swallow a size-3 glyph: accent dot, name in label.
332+ showBadge = { showInstanceBadge && providerEntry ?. accentColor !== undefined }
333+ badgeContent = "none"
334+ badgeClassName = "h-2 min-w-2 px-0"
321335 iconClassName = "size-3 shrink-0 grayscale opacity-60"
322336 />
323- < div className = "min-w-0 truncate text-foreground/75" > { modelLabel } </ div >
337+ < div className = "min-w-0 truncate text-foreground/75" >
338+ { showInstanceBadge && providerEntry
339+ ? `${ modelLabel } · ${ providerEntry . displayName } `
340+ : modelLabel }
341+ </ div >
324342 </ div >
325343 ) : null }
326344 { terminalStatus ? (
@@ -867,6 +885,9 @@ const SidebarThreadRow = memo(function SidebarThreadRow(props: {
867885 const modelInstanceId = thread . session ?. providerInstanceId ?? thread . modelSelection . instanceId ;
868886 const providerEntry = props . providerEntryByInstanceId . get ( modelInstanceId ) ?? null ;
869887 const driverKind = providerEntry ?. driverKind ?? null ;
888+ const showInstanceBadge =
889+ providerEntry !== null &&
890+ shouldShowInstanceBadge ( providerEntry , props . providerEntryByInstanceId . values ( ) ) ;
870891 const selectedModel = providerEntry ?. models . find (
871892 ( model ) => model . slug === thread . modelSelection . model ,
872893 ) ;
@@ -884,7 +905,8 @@ const SidebarThreadRow = memo(function SidebarThreadRow(props: {
884905 projectCwd = { props . projectCwd }
885906 projectFaviconPath = { props . projectFaviconPath }
886907 environmentLabel = { props . environmentLabel }
887- driverKind = { driverKind }
908+ providerEntry = { providerEntry }
909+ showInstanceBadge = { showInstanceBadge }
888910 modelInstanceId = { modelInstanceId }
889911 modelLabel = { modelLabel }
890912 branchMismatch = { branchMismatch }
@@ -1481,11 +1503,19 @@ const SidebarThreadRow = memo(function SidebarThreadRow(props: {
14811503 </ span >
14821504 ) : null }
14831505 { driverKind ? (
1484- < span className = "inline-flex shrink-0 items-center opacity-60 " >
1506+ < span className = "inline-flex shrink-0 items-center" >
14851507 < ProviderInstanceIcon
14861508 driverKind = { driverKind }
1487- displayName = { thread . session ?. providerName ?? modelInstanceId }
1488- iconClassName = "size-3.5"
1509+ displayName = {
1510+ providerEntry ?. displayName ??
1511+ thread . session ?. providerName ??
1512+ modelInstanceId
1513+ }
1514+ accentColor = { providerEntry ?. accentColor }
1515+ showBadge = { showInstanceBadge }
1516+ // Glyph dims, badge stays saturated; offset matches the composer trigger.
1517+ iconClassName = "size-3.5 opacity-60"
1518+ badgeClassName = "right-[-0.1875rem] bottom-[-0.1875rem] h-3 min-w-3 px-0.5 text-[7px]"
14891519 />
14901520 </ span >
14911521 ) : null }
@@ -1542,7 +1572,9 @@ const SidebarSearchResultRow = memo(function SidebarSearchResultRow(props: {
15421572 } ) ;
15431573 const modelInstanceId = thread . session ?. providerInstanceId ?? thread . modelSelection . instanceId ;
15441574 const providerEntry = props . providerEntryByInstanceId . get ( modelInstanceId ) ?? null ;
1545- const driverKind = providerEntry ?. driverKind ?? null ;
1575+ const showInstanceBadge =
1576+ providerEntry !== null &&
1577+ shouldShowInstanceBadge ( providerEntry , props . providerEntryByInstanceId . values ( ) ) ;
15461578 const selectedModel = providerEntry ?. models . find (
15471579 ( model ) => model . slug === thread . modelSelection . model ,
15481580 ) ;
@@ -1600,7 +1632,8 @@ const SidebarSearchResultRow = memo(function SidebarSearchResultRow(props: {
16001632 projectCwd = { props . projectCwd }
16011633 projectFaviconPath = { props . projectFaviconPath }
16021634 environmentLabel = { props . environmentLabel }
1603- driverKind = { driverKind }
1635+ providerEntry = { providerEntry }
1636+ showInstanceBadge = { showInstanceBadge }
16041637 modelInstanceId = { modelInstanceId }
16051638 modelLabel = { modelLabel }
16061639 branchMismatch = { branchMismatch }
0 commit comments