@@ -15,6 +15,7 @@ import type { TabType, TabMinimapItem } from '@/atoms/tab-atoms'
1515import type { SessionIndicatorStatus } from '@/atoms/agent-atoms'
1616import { tabMinimapCacheAtom } from '@/atoms/tab-atoms'
1717import { interfaceVariantAtom } from '@/atoms/theme'
18+ import { Spinner } from '@/components/ui/spinner'
1819import { TabPreviewPanel } from './TabPreviewPanel'
1920
2021export interface TabBarItemProps {
@@ -101,15 +102,7 @@ export function TabBarItem({
101102 }
102103
103104 const isScratch = type === 'scratch'
104- const indicatorColor = isScratch
105- ? undefined
106- : isStreaming !== 'idle'
107- ? isStreaming === 'completed'
108- ? 'border-green-500'
109- : isStreaming === 'blocked'
110- ? 'border-orange-500'
111- : 'border-blue-500'
112- : undefined
105+ const showAgentSpinner = type === 'agent' && isStreaming === 'running'
113106 const previewItems = minimapCache . get ( id ) ?? [ ]
114107 // 当前 active Tab 不显示预览面板
115108 const showPreview = isHovered && ! isActive
@@ -151,7 +144,7 @@ export function TabBarItem({
151144
152145 return (
153146 < div
154- className = "relative min-w-[120px ] max-w-[200px ] flex-[1_0_120px ] titlebar-no-drag"
147+ className = "relative min-w-[132px ] max-w-[240px ] flex-[1_0_132px ] titlebar-no-drag"
155148 onMouseEnter = { onHoverEnter }
156149 onMouseLeave = { onHoverLeave }
157150 >
@@ -185,9 +178,10 @@ export function TabBarItem({
185178 < span className = "flex-1" />
186179 ) : (
187180 < span className = "flex-1 min-w-0 truncate text-left flex items-center gap-1" >
181+ { showAgentSpinner && < Spinner size = "sm" className = "mr-2 shrink-0 text-primary/70" /> }
188182 { isAutomation && < Clock className = "size-3 shrink-0 text-foreground/40" /> }
189183 { isDelegation && ! isAutomation && < GitBranch className = "size-3 shrink-0 text-foreground/40" /> }
190- { title }
184+ < span className = "min-w-0 truncate" > { title } </ span >
191185 </ span >
192186 ) }
193187
@@ -216,17 +210,6 @@ export function TabBarItem({
216210 </ span >
217211 ) }
218212
219- { /* 状态包边 */ }
220- { indicatorColor && (
221- < span
222- className = { cn (
223- 'absolute inset-0 border-t-2 border-l-2 border-r-2 border-b-0 pointer-events-none tab-stream-indicator' ,
224- isClassic ? 'rounded-t-lg' : 'rounded-none' ,
225- indicatorColor ,
226- ) }
227- aria-hidden = "true"
228- />
229- ) }
230213 </ button >
231214
232215 { /* 悬浮预览面板(Portal 渲染到 body) */ }
0 commit comments