block-open-source / goose

Goose is a developer agent that operates from your command line to help you do the boring stuff.
https://block-open-source.github.io/goose/
Apache License 2.0
73 stars 12 forks source link

feat: auto save sessions before next user input #94

Closed lifeizhou-ap closed 6 days ago

lifeizhou-ap commented 6 days ago

Why Currently we only save the session file when user exits the goose successfully. When user exits goose unexpectedly, the session file is not saved.

What

Note Added the log level option to session resume, and session planned. This is not relevant to this feature. It is a followup of https://github.com/square/goose/pull/80

codefromthecrypt commented 6 days ago

so is this a fix to #89?

lamchau commented 6 days ago

could we merge #76 before we land this change (i don't have the ability to merge to main)? it'll add autocomplete to session selection :)

lifeizhou-ap commented 6 days ago

could we merge #76 before we land this change (i don't have the ability to merge to main)? it'll add autocomplete to session selection :)

Merged PR. Thanks for the heads-up!

lifeizhou-ap commented 6 days ago

so is this a fix to #89?

Yes, it is related to. This PR contains 2 parts:

  1. auto-save sessions

  2. allow user to specify session name so that we can create/read the file with the session name at the beginning of the session. More info in the comments here

I was about to mention this issue in the PR, but forgot! Thanks for the reminder!

codefromthecrypt commented 6 days ago

@lifeizhou-ap so if I specify the session name as an arg, and I "exit" the prompt, no more duplicate prompting after this change? or do we still have that.

lifeizhou-ap commented 6 days ago

@lifeizhou-ap so if I specify the session name as an arg, and I "exit" the prompt, no more duplicate prompting after this change? or do we still have that.

There will be no more prompting at the end of the session. At the beginning of the session, we show a message about the location of the session file.

Screenshot 2024-09-26 at 12 03 47 PM