Skip to content

Conversation

@yingjiehe-xyz
Copy link
Contributor

In the original implementaion, if users use approve mode and there is a pending confirmation and then users switch to a new session and try to resume the session, the confirmation will not be displayed corrected and cannot keep using due to mismatched tool request and response error.

In the PR, we tracked the resumed message length and use it for the base to check whether the confirmation is broken. And also append a tool response error message(mentioning the tool is cancelled) to fix the mismatch error.

Test:

Screen.Recording.2025-03-05.at.8.33.21.PM.mov

@yingjiehe-xyz yingjiehe-xyz marked this pull request as ready for review March 6, 2025 16:53
export interface ChatType {
id: number;
title: string;
historyMessageLength: number;
Copy link
Contributor

Choose a reason for hiding this comment

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

lets actually name it something like messageHistoryIndex, and add a comment here like

// messages up to this index are presumed to be "history" from a resumed session, this is used to track older tool confirmation requests
// anything before this index should not render any buttons, but anything after should 

i think we're treating the variable more as an index into when the messages are "old" than just using it for length

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks for the suggestion!

@yingjiehe-xyz yingjiehe-xyz merged commit fb44472 into main Mar 7, 2025
6 checks passed
@yingjiehe-xyz yingjiehe-xyz deleted the yingjiehe/resume branch March 7, 2025 00:51
michaelneale added a commit that referenced this pull request Mar 7, 2025
* main:
  bugfix: refactor workdirs to be async-safe, and simpler (#1558)
  feat: split required_extensions in bench to builtin/external (#1547)
  fix: continue to use resumed session after confirmation is cancelled (#1548)
  feat: add image tool to developer mcp (#1515)
  docs: using gooseignore (#1554)
  ci: use cargo update --workspace to ensure Cargo.lock is updated (#1539)
  fix: respond to interrupted tool calls with a ToolResponseMessageContent (#1557)
  fix: get tool def back to chat mode (#1538)
  ui: add default icon (#1553)
  fix: fix summarize agent, use session_id and add provider fn (#1552)
  feat(agent): memory condensation for longer context (#1457)
  docs: goose tips blog (#1550)
  docs: update to provider view (#1546)
  docs: resuming sessions (#1543)
  feat: goose bench framework for functional and regression testing
  feat: use refresh_tokens from databricks api (#1517)
  feat: use Ctrl/Cmd + ↑/↓ to navigate message history (#1501)
  feat: remove tools from chat mode (#1533)
  feat: use dropdown for goose selection (#1531)
  docs: goosehints in desktop (#1529)
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.

3 participants