Skip to content

Conversation

@matthewdiamant
Copy link
Contributor

Fixes: #1532

Currently, chat messages are stored in the Chat View. So, if you navigate away from the Chat View (such as to Settings), the chat messages are lost.

This PR:

  1. Moves chat message storage to the root level of the App. That way, navigating to any screen means that the chat is always retained,
  2. Consolidates chat logic inside of a new hook useChat(). There was a few different files in which messages we being loaded/reloaded, and now it all happens here. This also allows for some refactoring and simplifying. chat is now where both the messages and id (aka session id) now live. It might be a good idea to combine this with the useMessageStream() hook, given that they share a bit of responsibility and are mildly stepping on each other's toes.

@salman1993
Copy link
Contributor

✅ This worked for me when to go Settings and then Back, or if I go to Previous Sessions and then Back.

❌ "Resume Session" fails for me: https://github.com/user-attachments/assets/1c4b03de-792c-4693-b5d3-9863e4ba00f8

Copy link
Contributor

@salman1993 salman1993 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resuming session hangs for me from SessionHistoryView

@matthewdiamant
Copy link
Contributor Author

@salman1993
Good catch! Pushed up a fix.

Copy link
Contributor

@salman1993 salman1993 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@lily-de lily-de merged commit c95a15a into main Mar 10, 2025
6 checks passed
@lily-de lily-de deleted the mdiamant/1532-retain-session-through-views branch March 10, 2025 18:04
michaelneale added a commit that referenced this pull request Mar 11, 2025
* main:
  feat: enable smart approve for user by default (#1599)
  ui: fix modal state (#1598)
  ui: setting configuration (#1597)
  fix: merge error logging in goose bench  (#1545)
  feat: add additional goosebench evals (#1571)
  chore: update types and imports (#1594)
  Retain session through view changes (#1580)
  docs: Add steps for desktop tutorial (#1590)
  remove env vars from bottom menu model setting (#1584)
  Fix Goosehints modal UI (#1581)
  docs: typo fix (#1593)
  feat: update config endpoints for use with providers (#1563)
  fix: update anthropic provider headers (#1592)
  feat: Build Goose in a Docker Container (#1551)
  docs: voyp blog post (#1588)
sheagcraig added a commit to sheagcraig/goose that referenced this pull request Mar 11, 2025
* upstream/main: (48 commits)
  feat: enable smart approve for user by default (block#1599)
  ui: fix modal state (block#1598)
  ui: setting configuration (block#1597)
  fix: merge error logging in goose bench  (block#1545)
  feat: add additional goosebench evals (block#1571)
  chore: update types and imports (block#1594)
  Retain session through view changes (block#1580)
  docs: Add steps for desktop tutorial (block#1590)
  remove env vars from bottom menu model setting (block#1584)
  Fix Goosehints modal UI (block#1581)
  docs: typo fix (block#1593)
  feat: update config endpoints for use with providers (block#1563)
  fix: update anthropic provider headers (block#1592)
  feat: Build Goose in a Docker Container (block#1551)
  docs: voyp blog post (block#1588)
  fix: included files was panicing because dir didnt exist (block#1583)
  feat: work with docs/xls and simple html (block#1526)
  feat: parallel processing in approve mode (block#1575)
  Feat: support auto-including dirs in binary/bench-work-dir (block#1576)
  refactor models component (block#1535)
  ...
ahau-square pushed a commit that referenced this pull request May 2, 2025
cbruyndoncx pushed a commit to cbruyndoncx/goose that referenced this pull request Jul 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Opening settings in GUI and then going "back" drops the session

4 participants