feat: add message to ProgressNotification (#435)

Co-authored-by: ihrpr <inna.hrpr@gmail.com>
This commit is contained in:
Akshey D 2025-05-13 10:40:15 -07:00 • committed by GitHub
commit 9e66f7ce89
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -43,11 +43,11 @@ class ProgressContext(
total: float | None
current: float = field(default=0.0, init=False)
async def progress(self, amount: float) -> None:
async def progress(self, amount: float, message: str | None = None) -> None:
self.current += amount
await self.session.send_progress_notification(
self.progress_token, self.current, total=self.total
self.progress_token, self.current, total=self.total, message=message
)