File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -184,15 +184,17 @@ impl App {
184
184
}
185
185
AppEvent :: InsertHistoryCell ( cell) => {
186
186
let mut cell_transcript = cell. transcript_lines ( ) ;
187
+ let mut prepend_line_count = 0 ;
187
188
if !cell. is_stream_continuation ( ) && !self . transcript_lines . is_empty ( ) {
188
189
cell_transcript. insert ( 0 , Line :: from ( "" ) ) ;
190
+ prepend_line_count += 1 ;
189
191
}
190
192
if let Some ( Overlay :: Transcript ( t) ) = & mut self . overlay {
191
193
t. insert_lines ( cell_transcript. clone ( ) ) ;
192
194
tui. frame_requester ( ) . schedule_frame ( ) ;
193
195
}
194
196
// Compute absolute indices before extending transcript
195
- let start = self . transcript_lines . len ( ) ;
197
+ let start = self . transcript_lines . len ( ) + prepend_line_count ;
196
198
if let Some ( span) = cell. message_span ( )
197
199
&& matches ! ( cell. kind( ) , crate :: history_cell:: MessageKind :: User )
198
200
{
You can’t perform that action at this time.
0 commit comments