Skip to content

feat: implement rate limit warning banner and associated parameters#17

Merged
ethanyhou merged 2 commits into
mainfrom
ethan/rate-limit-banner
Apr 22, 2026
Merged

feat: implement rate limit warning banner and associated parameters#17
ethanyhou merged 2 commits into
mainfrom
ethan/rate-limit-banner

Conversation

@ethanyhou
Copy link
Copy Markdown
Contributor

Test:

  1. With handoff:
image
  1. Without handoff:
image
  1. The banner should be hide/unhide when check chat history.

Copilot AI review requested due to automatic review settings April 21, 2026 06:20
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds end-to-end support for showing a rate-limit warning banner in the Eclipse Chat UI when the language server emits a new $/copilot/rateLimitWarning notification.

Changes:

  • Introduces a reusable StaticBanner SWT widget (message + inline link + dismiss).
  • Adds a new LSP notification params record (RateLimitWarningParams) and client handler to forward it via the event broker.
  • Wires Chat UI to listen for the new event topic and render/dispose the banner, plus new i18n strings and a docs URL constant.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/i18n/messages.properties Adds new localized strings for the banner text/link/dismiss tooltip.
com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/i18n/Messages.java Exposes the new i18n keys as Messages.* fields.
com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/chat/StaticBanner.java New reusable banner widget implementation.
com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/chat/ChatView.java Subscribes to the new rate-limit warning topic and instructs the ActionBar to show the banner.
com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/chat/ActionBar.java Adds creation/disposal methods for the banner and clears it on new conversation.
com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/UiConstants.java Adds the “rate limit info” URL constant used by the banner.
com.microsoft.copilot.eclipse.core/src/com/microsoft/copilot/eclipse/core/lsp/protocol/RateLimitWarningParams.java New protocol record type for the notification payload.
com.microsoft.copilot.eclipse.core/src/com/microsoft/copilot/eclipse/core/lsp/CopilotLanguageClient.java Handles $/copilot/rateLimitWarning and forwards it onto the Eclipse event broker.
com.microsoft.copilot.eclipse.core/src/com/microsoft/copilot/eclipse/core/events/CopilotEventConstants.java Adds a new event topic constant for rate-limit warnings.

Comment thread com.microsoft.copilot.eclipse.swtbot.test/probe-scripts/static-banner-001.json Outdated
@ethanyhou ethanyhou force-pushed the ethan/rate-limit-banner branch from 0aa8d36 to 3817262 Compare April 22, 2026 05:06
@ethanyhou ethanyhou requested a review from jdneo April 22, 2026 05:08
@ethanyhou ethanyhou merged commit 6c0c423 into main Apr 22, 2026
4 checks passed
@ethanyhou ethanyhou deleted the ethan/rate-limit-banner branch April 22, 2026 06:57
@jdneo jdneo mentioned this pull request May 7, 2026
24 tasks
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