File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed
crates/chat-cli/src/cli/chat Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -170,8 +170,10 @@ impl PromptsArgs {
170
170
. is_some_and( |args| !args. is_empty( ) )
171
171
{
172
172
let name_width = UnicodeWidthStr :: width( bundle. prompt_get. name. as_str( ) ) ;
173
- let padding = arg_pos. saturating_sub( name_width) - UnicodeWidthStr :: width( "- " ) ;
174
- " " . repeat( padding)
173
+ let padding = arg_pos
174
+ . saturating_sub( name_width)
175
+ . saturating_sub( UnicodeWidthStr :: width( "- " ) ) ;
176
+ " " . repeat( padding. max( 1 ) )
175
177
} else {
176
178
"\n " . to_owned( )
177
179
}
Original file line number Diff line number Diff line change @@ -1427,7 +1427,6 @@ impl ChatSession {
1427
1427
queue ! ( self . stderr, style:: SetForegroundColor ( Color :: Magenta ) ) ?;
1428
1428
queue ! ( self . stderr, style:: SetForegroundColor ( Color :: Reset ) ) ?;
1429
1429
queue ! ( self . stderr, cursor:: Hide ) ?;
1430
- execute ! ( self . stderr, style:: Print ( "\n " ) ) ?;
1431
1430
1432
1431
if self . interactive {
1433
1432
self . spinner = Some ( Spinner :: new ( Spinners :: Dots , "Thinking..." . to_owned ( ) ) ) ;
@@ -1631,10 +1630,8 @@ impl ChatSession {
1631
1630
queue ! (
1632
1631
self . stderr,
1633
1632
style:: SetForegroundColor ( Color :: Reset ) ,
1634
- terminal:: Clear ( terminal:: ClearType :: CurrentLine ) ,
1635
1633
cursor:: MoveToColumn ( 0 ) ,
1636
1634
cursor:: Show ,
1637
- cursor:: MoveUp ( 1 ) ,
1638
1635
terminal:: Clear ( terminal:: ClearType :: CurrentLine ) ,
1639
1636
) ?;
1640
1637
}
You can’t perform that action at this time.
0 commit comments