fix: handle internal rate limiting message to prevent unknown error display #10067
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.
Related GitHub Issue
Closes: #10043
Description
This PR attempts to address Issue #10043, which reports that the internal rate limiting feature (user-configured delay between API requests via
rateLimitSecondsin provider settings) was causing an "unknown API error" message to display in the chat UI.The Problem:
When users configure a rate limit delay in their provider settings, the extension waits between API calls with a countdown message like "Rate limiting for X seconds...". This message was being passed to the error display logic in ChatRow.tsx, which did not recognize it and fell through to the "unknown error" fallback, causing alarm when the feature is working as expected.
The Solution:
internalRateLimitlocalization key to all 18 locale files with appropriate translationsKey files changed:
webview-ui/src/components/chat/ChatRow.tsx- Added detection logicwebview-ui/src/i18n/locales/*/chat.json- Added new translation keyTest Procedure
rateLimitSeconds: 5)Automated testing:
cd webview-ui && npx tsc --noEmit(passes)cd webview-ui && npx vitest run src/components/chat/__tests__/ChatRow.diff-actions.spec.tsx(4/4 pass)Pre-Submission Checklist
Screenshots / Videos
N/A - This is a message text change, not a visual UI change.
Documentation Updates
Additional Notes
Feedback and guidance are welcome! This PR is an attempt to address the issue based on the analysis in the issue comments.
Get in Touch
Roomote Agent