Skip to content

Commit

Permalink
show tips of the day
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelneale committed Sep 4, 2024
1 parent c7a6af4 commit 7028fee
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/goose/cli/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,15 +133,17 @@ def __init__(
messages.append(Message.assistant(RESUME_MESSAGE))
self.exchange.messages.extend(messages)

if len(self.exchange.messages) == 0 and plan:
self.setup_plan(plan=plan)
if len(self.exchange.messages) == 0:
# Show tips of the day for new sessions
random_tips = random.sample(TIPS, k=2)
formatted_tips = '\n '.join(random_tips)
print(f"Tips of the day:\n [yellow]{formatted_tips}[/yellow]")

if plan:
self.setup_plan(plan=plan)

self.prompt_session = GoosePromptSession.create_prompt_session()

# Show tip of the day
random_tips = random.sample(TIPS, k=2)
formatted_tips = '\n '.join(random_tips)
print(f"Tips of the day:\n [yellow]{formatted_tips}[/yellow]")

def setup_plan(self, plan: dict) -> None:
if len(self.exchange.messages):
Expand Down

0 comments on commit 7028fee

Please sign in to comment.