@@ -22,7 +22,6 @@ import ContentNotFound from "../NotFound/ContentNotFound";
2222// Clean interface - only display-related props
2323interface PlanPanelRightProps {
2424 planData : any ;
25- OnApproveStep : ( step : Step , total : number , completed : number , approve : boolean ) => Promise < void > ;
2625 submittingChatDisableInput : boolean ;
2726 processingSubtaskId : string | null ;
2827 loading : boolean ;
@@ -66,14 +65,14 @@ const PlanPanelRight: React.FC<PlanPanelRightProps> = ({
6665 // Helper function to get clean agent display name
6766 const getAgentDisplayName = ( agentName : string ) : string => {
6867 if ( ! agentName ) return 'Assistant' ;
69-
68+
7069 // Special handling for orchestrator/system agents
71- if ( agentName . toLowerCase ( ) . includes ( 'orchestrator' ) ||
72- agentName . toLowerCase ( ) === 'system' ||
73- agentName . toLowerCase ( ) . includes ( 'planner' ) ) {
70+ if ( agentName . toLowerCase ( ) . includes ( 'orchestrator' ) ||
71+ agentName . toLowerCase ( ) === 'system' ||
72+ agentName . toLowerCase ( ) . includes ( 'planner' ) ) {
7473 return 'BOT' ;
7574 }
76-
75+
7776 let cleanName = TaskService . cleanTextToSpaces ( agentName ) ;
7877 if ( cleanName . toLowerCase ( ) . includes ( 'agent' ) ) {
7978 cleanName = cleanName . replace ( / a g e n t / gi, '' ) . trim ( ) ;
@@ -93,15 +92,15 @@ const PlanPanelRight: React.FC<PlanPanelRightProps> = ({
9392 // Track when streaming starts
9493 useEffect ( ( ) => {
9594 console . log ( '🔍 Right panel - streaming messages changed:' , streamingMessages . length , 'hasStreamingStarted:' , hasStreamingStarted ) ;
96-
95+
9796 if ( streamingMessages . length > 0 && ! hasStreamingStarted ) {
98- const hasRealAgentContent = streamingMessages . some ( msg =>
99- msg . agent_name &&
100- msg . content &&
97+ const hasRealAgentContent = streamingMessages . some ( msg =>
98+ msg . agent_name &&
99+ msg . content &&
101100 msg . content . trim ( ) . length > 0 &&
102101 msg . agent_name !== 'system'
103102 ) ;
104-
103+
105104 if ( hasRealAgentContent ) {
106105 console . log ( '🚀 Real streaming content started in right panel' ) ;
107106 setHasStreamingStarted ( true ) ;
@@ -134,7 +133,7 @@ const PlanPanelRight: React.FC<PlanPanelRightProps> = ({
134133
135134 messages . forEach ( ( msg ) => {
136135 const groupKey = `${ msg . agent_name || 'system' } _${ msg . step_id || 'general' } ` ;
137-
136+
138137 if ( ! groups [ groupKey ] ) {
139138 groups [ groupKey ] = {
140139 id : groupKey ,
@@ -147,7 +146,7 @@ const PlanPanelRight: React.FC<PlanPanelRightProps> = ({
147146 }
148147
149148 groups [ groupKey ] . messages . push ( msg ) ;
150-
149+
151150 const msgTimestamp = normalizeTimestamp ( msg . timestamp ) ;
152151 const groupTimestamp = groups [ groupKey ] . latest_timestamp ;
153152 if ( msgTimestamp > groupTimestamp ) {
@@ -156,7 +155,7 @@ const PlanPanelRight: React.FC<PlanPanelRightProps> = ({
156155 }
157156 } ) ;
158157
159- return Object . values ( groups ) . sort ( ( a , b ) =>
158+ return Object . values ( groups ) . sort ( ( a , b ) =>
160159 new Date ( a . latest_timestamp ) . getTime ( ) - new Date ( b . latest_timestamp ) . getTime ( )
161160 ) ;
162161 } , [ ] ) ;
@@ -174,7 +173,7 @@ const PlanPanelRight: React.FC<PlanPanelRightProps> = ({
174173 // ✅ NEW: Get comprehensive agent status combining planned and streaming agents
175174 const getAgentStatus = useCallback ( ( ) : AgentStatus [ ] => {
176175 const agentStatusMap = new Map < string , AgentStatus > ( ) ;
177-
176+
178177 // Add planned agents from the plan approval request
179178 if ( planApprovalRequest ?. team && planApprovalRequest . team . length > 0 ) {
180179 planApprovalRequest . team . forEach ( agentName => {
@@ -194,11 +193,11 @@ const PlanPanelRight: React.FC<PlanPanelRightProps> = ({
194193 groupedStreamingMessages . forEach ( group => {
195194 const agentName = group . agent_name ;
196195 const displayName = getAgentDisplayName ( agentName ) ;
197-
196+
198197 const existing = agentStatusMap . get ( agentName ) ;
199- const status = group . status === 'completed' ? 'completed' :
200- group . status === 'error' ? 'error' : 'active' ;
201-
198+ const status = group . status === 'completed' ? 'completed' :
199+ group . status === 'error' ? 'error' : 'active' ;
200+
202201 agentStatusMap . set ( agentName , {
203202 name : agentName ,
204203 displayName,
@@ -252,7 +251,7 @@ const PlanPanelRight: React.FC<PlanPanelRightProps> = ({
252251 // ✅ ENHANCED: Show waiting message only when we don't have plan approval request
253252 if ( ! planApprovalRequest ) {
254253 return (
255- < div style = { {
254+ < div style = { {
256255 width : '280px' ,
257256 height : '100vh' ,
258257 display : 'flex' ,
@@ -271,7 +270,7 @@ const PlanPanelRight: React.FC<PlanPanelRightProps> = ({
271270 // Render Plan Section - show once we have plan approval request
272271 const renderPlanSection = ( ) => {
273272 return (
274- < div style = { {
273+ < div style = { {
275274 height : '45%' ,
276275 overflow : 'auto' ,
277276 marginBottom : '16px' ,
@@ -280,7 +279,7 @@ const PlanPanelRight: React.FC<PlanPanelRightProps> = ({
280279 borderRadius : '8px' ,
281280 border : '1px solid var(--colorNeutralStroke2)'
282281 } } >
283- < div style = { {
282+ < div style = { {
284283 display : 'flex' ,
285284 alignItems : 'center' ,
286285 justifyContent : 'space-between' ,
@@ -300,8 +299,8 @@ const PlanPanelRight: React.FC<PlanPanelRightProps> = ({
300299 </ div >
301300
302301 < div >
303- < Body1 style = { {
304- marginBottom : '16px' ,
302+ < Body1 style = { {
303+ marginBottom : '16px' ,
305304 fontStyle : 'italic' ,
306305 color : 'var(--colorNeutralForeground2)'
307306 } } >
@@ -318,15 +317,15 @@ const PlanPanelRight: React.FC<PlanPanelRightProps> = ({
318317 borderRadius : '6px' ,
319318 border : '1px solid var(--colorNeutralStroke2)'
320319 } } >
321- < Body1 style = { {
322- fontSize : '12px' ,
320+ < Body1 style = { {
321+ fontSize : '12px' ,
323322 color : 'var(--colorNeutralForeground1)' ,
324323 display : 'flex' ,
325324 alignItems : 'flex-start' ,
326325 gap : '8px'
327326 } } >
328- < span style = { {
329- backgroundColor : 'var(--colorBrandBackground)' ,
327+ < span style = { {
328+ backgroundColor : 'var(--colorBrandBackground)' ,
330329 color : 'var(--colorNeutralForegroundOnBrand)' ,
331330 borderRadius : '50%' ,
332331 width : '20px' ,
@@ -363,7 +362,7 @@ const PlanPanelRight: React.FC<PlanPanelRightProps> = ({
363362 height : '55%' ,
364363 overflow : 'auto'
365364 } } >
366- < div style = { {
365+ < div style = { {
367366 display : 'flex' ,
368367 alignItems : 'center' ,
369368 justifyContent : 'space-between' ,
@@ -393,7 +392,7 @@ const PlanPanelRight: React.FC<PlanPanelRightProps> = ({
393392 </ div >
394393
395394 { agents . length === 0 ? (
396- < div style = { {
395+ < div style = { {
397396 textAlign : 'center' ,
398397 color : 'var(--colorNeutralForeground3)' ,
399398 fontSize : '12px' ,
@@ -413,9 +412,9 @@ const PlanPanelRight: React.FC<PlanPanelRightProps> = ({
413412 position : 'relative'
414413 } } >
415414 { /* Agent Header */ }
416- < div style = { {
417- display : 'flex' ,
418- justifyContent : 'space-between' ,
415+ < div style = { {
416+ display : 'flex' ,
417+ justifyContent : 'space-between' ,
419418 alignItems : 'center' ,
420419 marginBottom : '8px'
421420 } } >
@@ -427,22 +426,22 @@ const PlanPanelRight: React.FC<PlanPanelRightProps> = ({
427426 appearance = "outline"
428427 icon = { getStatusIcon ( agent . status ) }
429428 color = {
430- agent . status === 'completed' ? 'success' :
431- agent . status === 'active' ? 'brand' :
432- agent . status === 'error' ? 'danger' :
433- 'neutral'
429+ agent . status === 'completed' ? 'success' :
430+ agent . status === 'active' ? 'brand' :
431+ agent . status === 'error' ? 'danger' :
432+ 'neutral'
434433 }
435434 >
436- { agent . status === 'completed' ? 'Completed' :
437- agent . status === 'active' ? 'Working' :
438- agent . status === 'error' ? 'Error' :
439- 'Planned' }
435+ { agent . status === 'completed' ? 'Completed' :
436+ agent . status === 'active' ? 'Working' :
437+ agent . status === 'error' ? 'Error' :
438+ 'Planned' }
440439 </ Tag >
441440 </ div >
442441
443442 { /* Agent Role */ }
444- < Body1 style = { {
445- fontSize : '11px' ,
443+ < Body1 style = { {
444+ fontSize : '11px' ,
446445 color : 'var(--colorNeutralForeground3)' ,
447446 fontStyle : 'italic' ,
448447 marginBottom : '4px'
@@ -462,8 +461,8 @@ const PlanPanelRight: React.FC<PlanPanelRightProps> = ({
462461
463462 { /* Latest Message */ }
464463 { agent . latest_message && (
465- < Body1 style = { {
466- fontSize : '10px' ,
464+ < Body1 style = { {
465+ fontSize : '10px' ,
467466 color : 'var(--colorNeutralForeground2)' ,
468467 lineHeight : 1.3 ,
469468 marginTop : '4px'
@@ -491,12 +490,12 @@ const PlanPanelRight: React.FC<PlanPanelRightProps> = ({
491490
492491 { /* Recent Activity - only show if we have streaming messages */ }
493492 { groupedStreamingMessages . length > 0 && (
494- < div style = { {
493+ < div style = { {
495494 marginTop : '20px' ,
496495 paddingTop : '16px' ,
497496 borderTop : '1px solid var(--colorNeutralStroke2)'
498497 } } >
499- < Body1 style = { {
498+ < Body1 style = { {
500499 fontSize : '12px' ,
501500 color : 'var(--colorNeutralForeground2)' ,
502501 marginBottom : '8px' ,
@@ -524,7 +523,7 @@ const PlanPanelRight: React.FC<PlanPanelRightProps> = ({
524523
525524 // Main render - show content in proportional layout (280px width to match left panel)
526525 return (
527- < div style = { {
526+ < div style = { {
528527 width : '280px' ,
529528 height : '100vh' ,
530529 padding : '20px' ,
@@ -534,7 +533,7 @@ const PlanPanelRight: React.FC<PlanPanelRightProps> = ({
534533 } } >
535534 { /* Plan section - 45% height, scrollable */ }
536535 { renderPlanSection ( ) }
537-
536+
538537 { /* Agents section - 55% height, scrollable */ }
539538 { renderAgentsSection ( ) }
540539
0 commit comments