Add end of service notifications (#30982)

Release Notes:

- N/A

---------

Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
Co-authored-by: Marshall Bowers <git@maxdeviant.com>
This commit is contained in:
Mikayla Maki 2025-05-20 02:20:00 +02:00 committed by GitHub
parent c747a57b7e
commit 315321bf8c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 327 additions and 201 deletions

View file

@ -83,6 +83,13 @@ impl EditPredictionUsage {
Ok(Self { limit, amount })
}
pub fn over_limit(&self) -> bool {
match self.limit {
UsageLimit::Limited(limit) => self.amount >= limit,
UsageLimit::Unlimited => false,
}
}
}
pub trait EditPredictionProvider: 'static + Sized {