-
Notifications
You must be signed in to change notification settings - Fork 13
feat: [TBB] Implement quota warning handling and UI updates for TBB #186
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
99de690
feat: Refactor quota usage menu and UI updates
ethanyhou 3116cfd
Address comments.
ethanyhou a3bc574
feat: Implement TBB quota warning notifications and related UI compon…
ethanyhou ab9a6c5
Merge branch 'ethan/tbb-plan-usage' into ethan/tbb-notification
ethanyhou 60dd17b
Merge branch 'main' into ethan/tbb-notification
ethanyhou 9536b05
feat: Implement quota warning handling and UI updates for TBB
ethanyhou 89a9b43
Removed redundant code.
ethanyhou 7c5ce0e
Address comments.
ethanyhou 464a817
refactor: Clean up unused imports and update warning widget layout
ethanyhou 828fd5c
feat: updated quota warning msg with overage support
ethanyhou fbafcd2
Address comments.
ethanyhou 0576d73
Merge branch 'main' into ethan/tbb-notification
ethanyhou File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
...se.core/src/com/microsoft/copilot/eclipse/core/lsp/protocol/quota/QuotaWarningParams.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| // Copyright (c) Microsoft Corporation. | ||
| // Licensed under the MIT license. | ||
|
|
||
| package com.microsoft.copilot.eclipse.core.lsp.protocol.quota; | ||
|
|
||
| import com.google.gson.annotations.SerializedName; | ||
|
|
||
| /** | ||
| * Parameters for the {@code copilot/quotaWarning} notification, sent by the language server when | ||
| * the user crosses a quota usage threshold or starts consuming overages. | ||
| * | ||
| * @param title warning title (e.g. "Copilot Quota Usage Alert") | ||
| * @param message human-readable warning message | ||
| * @param severity severity level, either {@code "warning"} or {@code "info"} | ||
| * @param chat current chat quota snapshot, when available | ||
| * @param completions current completions quota snapshot, when available | ||
| * @param premiumInteractions current premium interactions quota snapshot, when available | ||
| * @param copilotPlan the user's Copilot plan | ||
| */ | ||
| public record QuotaWarningParams(String title, String message, String severity, QuotaSnapshotParams chat, | ||
|
ethanyhou marked this conversation as resolved.
|
||
| QuotaSnapshotParams completions, | ||
| @SerializedName("premium_interactions") QuotaSnapshotParams premiumInteractions, CopilotPlan copilotPlan) { | ||
| } | ||
|
ethanyhou marked this conversation as resolved.
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/chat/BannerAction.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| // Copyright (c) Microsoft Corporation. | ||
| // Licensed under the MIT license. | ||
|
|
||
| package com.microsoft.copilot.eclipse.ui.chat; | ||
|
|
||
| /** | ||
| * A clickable action rendered below the message of a {@link StaticBanner}. Each action is a localized label paired | ||
| * with the URL that should be opened when the user activates it. | ||
| * | ||
| * @param text the visible link label | ||
| * @param url the target URL opened on activation | ||
| */ | ||
| public record BannerAction(String text, String url) { | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.