File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
crates/chat-cli/src/cli/chat Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -832,6 +832,26 @@ impl ChatSession {
832832 }
833833
834834 let ( context, report, display_err_message) = match err {
835+ ChatError :: Auth ( AuthError :: NoToken ) => {
836+ execute ! (
837+ self . stderr,
838+ style:: SetAttribute ( Attribute :: Bold ) ,
839+ StyledText :: error_fg( ) ,
840+ style:: Print ( "Authentication Error\n " ) ,
841+ StyledText :: reset_attributes( ) ,
842+ StyledText :: reset( ) ,
843+ style:: Print ( "\n Your login session has expired. Please log in again using:\n \n " ) ,
844+ StyledText :: success_fg( ) ,
845+ style:: Print ( " q login\n \n " ) ,
846+ StyledText :: reset( ) ,
847+ ) ?;
848+
849+ self . conversation
850+ . append_transcript ( "Authentication expired - please log in again" . to_string ( ) ) ;
851+
852+ self . inner = Some ( ChatState :: Exit ) ;
853+ return Ok ( ( ) ) ;
854+ } ,
835855 ChatError :: Interrupted { tool_uses : ref inter } => {
836856 execute ! ( self . stderr, style:: Print ( "\n \n " ) ) ?;
837857
You can’t perform that action at this time.
0 commit comments