File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -157,9 +157,7 @@ fn process_message<'a>(
157157 lines. push ( line) ;
158158 if is_opened {
159159 // TODO: code highlight
160- lines. extend (
161- ratskin. parse_text ( & format ! ( "```\n {}\n ```" , content) , width) ,
162- ) ;
160+ lines. extend ( ratskin. parse_text ( & content, width) ) ;
163161 }
164162 }
165163 }
@@ -188,7 +186,7 @@ fn process_message<'a>(
188186 let mut line = role_prefix ( "Assistant" , theme. assistant ) ;
189187 let parts =
190188 // add space prefix to correct first line with wrapping
191- ratskin. parse_text ( & format ! ( " {}" , & text) , width) ;
189+ ratskin. parse_text ( & format ! ( "Assistant: {}" , & text) , width) ;
192190 if let Some ( first_line) = parts. first ( ) {
193191 let mut spans = first_line
194192 . spans
@@ -197,11 +195,9 @@ fn process_message<'a>(
197195 . enumerate ( )
198196 . map ( |( i, s) | {
199197 if i == 0 {
200- s. clone ( )
201- . style ( theme. text_style ( ) )
202- . content ( s. content . trim ( ) . to_string ( ) )
198+ s. clone ( ) . content ( s. content [ 10 ..] . to_string ( ) )
203199 } else {
204- s. style ( theme . text_style ( ) )
200+ s
205201 }
206202 } )
207203 . collect :: < Vec < _ > > ( ) ;
You can’t perform that action at this time.
0 commit comments