Repository navigation
fix(ai): refresh chat sidebar model status when provider keys change - #8581
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughAI API key changes now broadcast updated AI status through Electron IPC. ChangesAI status synchronization and popup sizing
Estimated code review effort: 2 (Simple) | ~10 minutes Sequence Diagram(s)sequenceDiagram
participant AiChatSidebar
participant IpcRenderer
participant MainProcess
AiChatSidebar->>IpcRenderer: Register main:ai-status-changed listener
MainProcess->>IpcRenderer: Broadcast updated AI status
IpcRenderer->>AiChatSidebar: Deliver availableModels
AiChatSidebar->>AiChatSidebar: Update model availability
Possibly related PRs
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
and annotations fix(BulkEditor): preserve hidden metadata during bulk edit roundtrip fix(ai): refresh chat sidebar model status when provider keys change (usebruno#8581) * fix(ai): refresh chat sidebar model status when provider keys change * Added the cropping related issue fix in AI Assist fix(BulkEditor): enhance metadata preservation during bulk edit roundtrip
and annotations fix(BulkEditor): preserve hidden metadata during bulk edit roundtrip fix(ai): refresh chat sidebar model status when provider keys change (usebruno#8581) * fix(ai): refresh chat sidebar model status when provider keys change * Added the cropping related issue fix in AI Assist fix(BulkEditor): enhance metadata preservation during bulk edit roundtrip fix(styled-wrapper): update placeholder styles to use theme variables reset
and annotations fix(BulkEditor): preserve hidden metadata during bulk edit roundtrip fix(ai): refresh chat sidebar model status when provider keys change (usebruno#8581) * fix(ai): refresh chat sidebar model status when provider keys change * Added the cropping related issue fix in AI Assist fix(BulkEditor): enhance metadata preservation during bulk edit roundtrip fix(styled-wrapper): update placeholder styles to use theme variables reset
JIRA: BRU-3826
Description
Issue After setting/changing/removing the API key for an AI provider via Preferences, the Chat Sidebar did not reflect any change in its model list and send button until it was opened anew.
Cause: Status of the sidebar depends on the key store of the main process, which refreshes on [isOpen, aiEnabled, preferences.ai]. Neither key set nor key clear emits anything to Redux and does not broadcast an event, thus never changing what the sidebar listens to.
Resolution: The main process sends the main:ai-status-changed event after every key set/clear. The sidebar listens to it and uses the models in the payload.
Contribution Checklist:
Note: Keeping the PR small and focused helps make it easier to review and merge. If you have multiple changes you want to make, please consider submitting them as separate pull requests.
Publishing to New Package Managers
Please see here for more information.
Before fix:

After Fix:

Summary by CodeRabbit
New Features
Bug Fixes