-
Notifications
You must be signed in to change notification settings - Fork 0
release/v5.3.4 #48
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
release/v5.3.4 #48
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -300,6 +300,20 @@ export class ClineProvider | |||||||||||||||||
| } else { | ||||||||||||||||||
| this.log("CloudService not ready, deferring cloud profile sync") | ||||||||||||||||||
| } | ||||||||||||||||||
|
|
||||||||||||||||||
| // Multi-window synchronization: refresh secrets when window gains focus | ||||||||||||||||||
| const windowStateDisposable = vscode.window.onDidChangeWindowState(async (e) => { | ||||||||||||||||||
| if (e.focused && this.contextProxy.isInitialized) { | ||||||||||||||||||
| await this.contextProxy.refreshSecrets() | ||||||||||||||||||
| await this.postStateToWebview() | ||||||||||||||||||
| } | ||||||||||||||||||
| }) | ||||||||||||||||||
| this.disposables.push(windowStateDisposable) | ||||||||||||||||||
|
Comment on lines
+304
to
+311
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 Performance Issue: The Fix: Remove the redundant focus listener and rely on the event-driven synchronization. Impact: Reduces unnecessary IPC calls and secret storage reads
Suggested change
|
||||||||||||||||||
|
|
||||||||||||||||||
| // Listen for secret changes from other windows | ||||||||||||||||||
| this.contextProxy.setOnSecretsChanged(async () => { | ||||||||||||||||||
| await this.postStateToWebview() | ||||||||||||||||||
| }) | ||||||||||||||||||
| } | ||||||||||||||||||
|
|
||||||||||||||||||
| /** | ||||||||||||||||||
|
|
@@ -628,6 +642,7 @@ export class ClineProvider | |||||||||||||||||
| this.mcpHub = undefined | ||||||||||||||||||
| this.marketplaceManager?.cleanup() | ||||||||||||||||||
| this.customModesManager?.dispose() | ||||||||||||||||||
| this.contextProxy?.dispose() | ||||||||||||||||||
| this.log("Disposed all disposables") | ||||||||||||||||||
| ClineProvider.activeInstances.delete(this) | ||||||||||||||||||
|
|
||||||||||||||||||
|
|
||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟡 Code Quality
Issue: The event listener for secret changes lacks error handling. If
refreshSecretsor the callback fails, it could lead to unhandled promise rejections.Fix: Wrap the execution in a try-catch block to safely handle any errors during the update process.
Impact: Prevents silent failures and unhandled rejections