File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
crates/chat-cli/src/cli/chat Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -1497,6 +1497,7 @@ impl ChatSession {
1497
1497
let mut ended = false ;
1498
1498
let mut parser = ResponseParser :: new ( response) ;
1499
1499
let mut state = ParseState :: new ( Some ( self . terminal_width ( ) ) ) ;
1500
+ let mut response_prefix_printed = false ;
1500
1501
1501
1502
let mut tool_uses = Vec :: new ( ) ;
1502
1503
let mut tool_name_being_recvd: Option < String > = None ;
@@ -1526,6 +1527,17 @@ impl ChatSession {
1526
1527
tool_name_being_recvd = Some ( name) ;
1527
1528
} ,
1528
1529
parser:: ResponseEvent :: AssistantText ( text) => {
1530
+ // Add Q response prefix before the first assistant text
1531
+ if !response_prefix_printed && !text. trim ( ) . is_empty ( ) {
1532
+ // Print the Q response prefix with cyan color
1533
+ execute ! (
1534
+ self . stdout,
1535
+ style:: SetForegroundColor ( Color :: Cyan ) ,
1536
+ style:: Print ( "> " ) ,
1537
+ style:: SetForegroundColor ( Color :: Reset )
1538
+ ) ?;
1539
+ response_prefix_printed = true ;
1540
+ }
1529
1541
buf. push_str ( & text) ;
1530
1542
} ,
1531
1543
parser:: ResponseEvent :: ToolUse ( tool_use) => {
You can’t perform that action at this time.
0 commit comments