From 5ecc326308ddbf173ac5b4e497085bd62e53896f Mon Sep 17 00:00:00 2001 From: Lifei Zhou Date: Wed, 25 Sep 2024 22:23:44 +1000 Subject: [PATCH] added info message about session file location --- src/goose/cli/session.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/goose/cli/session.py b/src/goose/cli/session.py index f795ba25e..733421ea2 100644 --- a/src/goose/cli/session.py +++ b/src/goose/cli/session.py @@ -160,7 +160,7 @@ def run(self) -> None: except Exception: # rewind to right before the last user message self.exchange.rewind() - print(traceback.format_exc()) + print(traceback.lformat_exc()) print( "\n[red]The error above was an exception we were not able to handle.\n\n[/]" + "These errors are often related to connection or authentication\n" @@ -234,6 +234,11 @@ def session_file_path(self) -> Path: return session_path(self.name) def load_session(self) -> List[Message]: + message = ( + f"session is going to be saved to [bold cyan]{self.session_file_path}[/bold cyan]." + + " You can view it anytime." + ) + print(Panel(message)) return read_or_create_file(self.session_file_path) def _log_cost(self) -> None: