Skip to content

Conversation

eneufeld
Copy link
Contributor

@eneufeld eneufeld commented Jul 3, 2025

What it does

  • Updated ToolProviders to cancel execution
  • Added tests

How to test

Let universal call a long running tool, eg delegate to agent.
Press the cancel button in the chat view. see that delegation stops.
Previously this continued.

Follow-ups

Breaking changes

  • This PR introduces breaking changes and requires careful review. If yes, the breaking changes section in the changelog has been updated.

Attribution

Review checklist

Reminder for reviewers

@eneufeld eneufeld requested review from sdirix and ndoschek July 3, 2025 14:02
@github-project-automation github-project-automation bot moved this to Waiting on reviewers in PR Backlog Jul 3, 2025
@eneufeld eneufeld force-pushed the feat/supportToolCancel branch from d3337e7 to 46f40f3 Compare July 3, 2025 14:51
Copy link
Contributor

@ndoschek ndoschek left a comment

Choose a reason for hiding this comment

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

Thanks, @eneufeld. I mostly tested this with the agent delegation feature, and it looks good to me. I would just suggest removing a few superfluous comments (see inline).

Besides, I noticed quite a few changes that are essentially only code formatting. I know the code-formatting configuration is sometimes off (I also opened #15959 today), but usually for TypeScript files the discrepancy to the existing code base isn't that large (at least in my case?).
This PR contains many pure formatting changes; if you don't mind, could you revert those if you find the time? TIA

@eneufeld eneufeld force-pushed the feat/supportToolCancel branch 3 times, most recently from c085f03 to cc15322 Compare July 4, 2025 20:44
@eneufeld
Copy link
Contributor Author

eneufeld commented Jul 4, 2025

@ndoschek I updated the pr

Copy link
Contributor

@ndoschek ndoschek left a comment

Choose a reason for hiding this comment

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

Hi @eneufeld, thank you for the update!

I had another look, and I noticed, the check for cancellation could be simplified by using the .isCanceled getter from the response model, wdyt?

Also, if we cancel a run, the AgentCompletionNotificationService notifies us that the task was completed, which is not entirely correct IMO.
(I am using the ai-features.notifications.default: `message' setting).
We could show the completion notification only if it was not canceled by the user for example. But we can also extract a follow up for that one, that's fine by me.

PS: unfortunately I cannot resolve my own comments right now, but the previous comments are resolved from my POV.

@ndoschek ndoschek mentioned this pull request Jul 11, 2025
15 tasks
@eneufeld
Copy link
Contributor Author

Also, if we cancel a run, the AgentCompletionNotificationService notifies us that the task was completed, which is not entirely correct IMO. (I am using the ai-features.notifications.default: `message' setting). We could show the completion notification only if it was not canceled by the user for example. But we can also extract a follow up for that one, that's fine by me.

this is fixed here:
#15956

@eneufeld eneufeld force-pushed the feat/supportToolCancel branch from cc15322 to 9aa97fd Compare July 16, 2025 21:05
@JonasHelming
Copy link
Contributor

@sdirix Ping

Copy link
Member

@sdirix sdirix left a comment

Choose a reason for hiding this comment

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

Works for me. Especially canceling the delegation is a great feature.

I left some comments. Please have a look.

- Updated ToolProviders to cancel execution
- Added tests
@eneufeld eneufeld force-pushed the feat/supportToolCancel branch from 9aa97fd to 937f64f Compare July 30, 2025 15:04
@eneufeld
Copy link
Contributor Author

@sdirix I updated this

Copy link
Member

@sdirix sdirix left a comment

Choose a reason for hiding this comment

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

Works for me!

@github-project-automation github-project-automation bot moved this from Waiting on reviewers to Needs merge in PR Backlog Jul 30, 2025
@eneufeld eneufeld merged commit 003c86a into master Jul 31, 2025
9 of 11 checks passed
@github-project-automation github-project-automation bot moved this from Needs merge to Done in PR Backlog Jul 31, 2025
@github-actions github-actions bot added this to the 1.64.0 milestone Jul 31, 2025
@sdirix sdirix deleted the feat/supportToolCancel branch July 31, 2025 09:37
laemmleint pushed a commit to mvtecsoftware/theia that referenced this pull request Aug 18, 2025
- Updated ToolProviders to cancel execution
- Added tests

---------

Co-authored-by: Stefan Dirix <sdirix@eclipsesource.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants