@@ -77,9 +77,10 @@ export const ValidationErrorPopover: React.FC<ValidationErrorPopoverProps> = ({
7777 </ box >
7878
7979 < box style = { { flexDirection : 'column' , paddingTop : 1 , gap : 0 } } >
80- { errors . slice ( 0 , 3 ) . map ( ( error ) => {
81- const agentId = error . id . replace ( / _ \d + $ / , '' )
82- const isNetworkError = error . id === NETWORK_ERROR_ID
80+ { errors . slice ( 0 , 3 ) . map ( ( error , index ) => {
81+ const errorId = error . id ?? ''
82+ const agentId = errorId . replace ( / _ \d + $ / , '' )
83+ const isNetworkError = errorId === NETWORK_ERROR_ID
8384 const agentInfo = loadedAgentsData ?. agents . find (
8485 ( a ) => a . id === agentId ,
8586 ) as LocalAgentInfo | undefined
@@ -91,7 +92,7 @@ export const ValidationErrorPopover: React.FC<ValidationErrorPopoverProps> = ({
9192 if ( isNetworkError ) {
9293 return (
9394 < box
94- key = { error . id }
95+ key = { errorId || ` error- ${ index } ` }
9596 style = { { flexDirection : 'column' , paddingTop : 0.5 } }
9697 >
9798 < text style = { { fg : theme . muted , wrapMode : 'word' } } >
@@ -104,7 +105,7 @@ export const ValidationErrorPopover: React.FC<ValidationErrorPopoverProps> = ({
104105 if ( agentInfo ?. filePath ) {
105106 return (
106107 < box
107- key = { error . id }
108+ key = { errorId || ` error- ${ index } ` }
108109 style = { { flexDirection : 'column' , paddingTop : 0.5 } }
109110 >
110111 < text style = { { fg : theme . muted , wrapMode : 'word' } } >
@@ -131,11 +132,11 @@ export const ValidationErrorPopover: React.FC<ValidationErrorPopoverProps> = ({
131132
132133 return (
133134 < box
134- key = { error . id }
135+ key = { errorId || ` error- ${ index } ` }
135136 style = { { flexDirection : 'column' , paddingTop : 0.5 } }
136137 >
137138 < text style = { { fg : theme . muted , wrapMode : 'word' } } >
138- { `• ${ agentId } ` }
139+ { `• ${ agentId || 'Unknown' } ` }
139140 </ text >
140141 < text
141142 style = { {
0 commit comments