@@ -134,20 +134,18 @@ pub fn draw(frame: &mut Frame, app: &App) {
134134 }
135135 }
136136 kittycad:: types:: MlCopilotServerMessage :: Error { detail } => {
137- for ( i, part) in detail. split ( '\n' ) . enumerate ( ) {
138- let label = if i == 0 { "ML-ephant> " } else { "ML-ephant> " } ;
137+ for part in detail. split ( '\n' ) {
139138 lines. push ( Line :: from ( vec ! [
140- Span :: styled( label , Style :: default ( ) . fg( Color :: Green ) ) ,
139+ Span :: styled( "ML-ephant> " , Style :: default ( ) . fg( Color :: Green ) ) ,
141140 Span :: styled( part. to_string( ) , Style :: default ( ) . fg( Color :: Red ) ) ,
142141 ] ) ) ;
143142 }
144143 }
145144 kittycad:: types:: MlCopilotServerMessage :: ToolOutput { result } => {
146145 let raw = format ! ( "{result:#?}" ) ;
147- for ( i, part) in raw. split ( '\n' ) . enumerate ( ) {
148- let label = if i == 0 { "ML-ephant> " } else { "ML-ephant> " } ;
146+ for part in raw. split ( '\n' ) {
149147 lines. push ( Line :: from ( vec ! [
150- Span :: styled( label , Style :: default ( ) . fg( Color :: Green ) ) ,
148+ Span :: styled( "ML-ephant> " , Style :: default ( ) . fg( Color :: Green ) ) ,
151149 Span :: styled( "tool output → " , Style :: default ( ) . fg( Color :: Yellow ) ) ,
152150 Span :: raw( part. to_string( ) ) ,
153151 ] ) ) ;
0 commit comments