Skip to content

Fix: Correct cancellation token usage in UserProxyAgent docstring#4874

Merged
jackgerrits merged 3 commits into
microsoft:mainfrom
slow-loop:main
Jan 2, 2025
Merged

Fix: Correct cancellation token usage in UserProxyAgent docstring#4874
jackgerrits merged 3 commits into
microsoft:mainfrom
slow-loop:main

Conversation

@slow-loop
Copy link
Copy Markdown
Contributor

Why are these changes needed?

The example code in UserProxyAgent's docstring has a bug where timeout handling doesn't work. The code creates a new CancellationToken instead of using the shared token that gets cancelled by the timeout callback, making the timeout ineffective.

Related issue number

Checks

Copy link
Copy Markdown
Contributor

@jackgerrits jackgerrits left a comment

Choose a reason for hiding this comment

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

Thanks!

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Jan 2, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 68.20%. Comparing base (16ceded) to head (8afabac).
Report is 738 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4874      +/-   ##
==========================================
- Coverage   68.21%   68.20%   -0.02%     
==========================================
  Files         158      158              
  Lines        9960     9960              
==========================================
- Hits         6794     6793       -1     
- Misses       3166     3167       +1     
Flag Coverage Δ
unittests 68.20% <ø> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@jackgerrits jackgerrits merged commit a1d782d into microsoft:main Jan 2, 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.

3 participants