Skip to content

fix: handle errors due to open dialogs during tool calls#1953

Open
samiyac wants to merge 9 commits intomainfrom
mcp-dialog-pt1
Open

fix: handle errors due to open dialogs during tool calls#1953
samiyac wants to merge 9 commits intomainfrom
mcp-dialog-pt1

Conversation

@samiyac
Copy link
Copy Markdown

@samiyac samiyac commented Apr 24, 2026

This change is part of the fix for #1069

  • Adds a check for existence of open dialogs before trying to detect devtools

@samiyac samiyac requested a review from OrKoN April 27, 2026 12:35
Comment thread src/index.ts Outdated
Copy link
Copy Markdown
Collaborator

@OrKoN OrKoN left a comment

Choose a reason for hiding this comment

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

Let's add tests?

Comment thread src/tools/ToolDefinition.ts Outdated
@samiyac
Copy link
Copy Markdown
Author

samiyac commented Apr 27, 2026

Added a test

@samiyac samiyac requested a review from OrKoN April 27, 2026 19:07
Comment thread tests/index.test.ts
});

const content = result.content as TextContent[];
assert.match(content[0].text, /\[Blocked\] Action triggered a dialog\./);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

could we assert complete response via a snapshot assertion? I want to make sure there is no duplication in the full response

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.

2 participants