diff --git a/CHANGELOG.md b/CHANGELOG.md index 2e53e9f87..5cfe41867 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,40 @@ # Changelog +## [v5.3.4] - 2026-02-03 + +### Fixed + +- Fixed multi-window authentication synchronization +- Fixed beta model access for axon-code-2-pro + +--- + +## [v5.3.3] - 2026-02-02 + +### Fixed + +- Fixed beta model access for axon-code-2-pro + +--- + +## [v5.3.2] - 2026-02-02 + +### Added + +- Beta models gating for axon-code-2-pro with backend API integration +- Custom icons utility for improved UI components + +### Changed + +- Set temperature to 0.2 for OpenRouter provider +- Enhanced file edit tool with improved functionality +- Updated kilocode models configuration +- Cleaned up chat text area component +- Updated and optimized test files +- UI improvements across chat components + +--- + ## [v5.3.1] - 2026-01-30 ### Added diff --git a/src/core/config/ContextProxy.ts b/src/core/config/ContextProxy.ts index 035ebb6bd..58a0304c9 100644 --- a/src/core/config/ContextProxy.ts +++ b/src/core/config/ContextProxy.ts @@ -40,6 +40,8 @@ export class ContextProxy { private stateCache: GlobalState private secretCache: SecretState private _isInitialized = false + private secretsChangeDisposable?: vscode.Disposable + private onSecretChangeCallback?: () => void | Promise constructor(context: vscode.ExtensionContext) { this.originalContext = context @@ -92,9 +94,32 @@ export class ContextProxy { // Migration: Check for old nested image generation settings and migrate them await this.migrateImageGenerationSettings() + // Listen for secret changes from other windows to keep cache in sync + this.secretsChangeDisposable = this.originalContext.secrets.onDidChange(async () => { + await this.refreshSecrets() + if (this.onSecretChangeCallback) { + await this.onSecretChangeCallback() + } + }) + this._isInitialized = true } + /** + * Register a callback to be invoked when secrets change (e.g., from another window). + * This enables cross-window synchronization of auth tokens and other secrets. + */ + public setOnSecretsChanged(callback: () => void | Promise) { + this.onSecretChangeCallback = callback + } + + /** + * Dispose of resources, including the secrets change listener. + */ + public dispose() { + this.secretsChangeDisposable?.dispose() + } + /** * Migrates old nested openRouterImageGenerationSettings to the new flattened structure */ diff --git a/src/core/webview/ClineProvider.ts b/src/core/webview/ClineProvider.ts index 8344f61ab..3fee89dc0 100644 --- a/src/core/webview/ClineProvider.ts +++ b/src/core/webview/ClineProvider.ts @@ -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) + + // 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) diff --git a/src/package.json b/src/package.json index aafed05c1..98b4b25ee 100644 --- a/src/package.json +++ b/src/package.json @@ -3,7 +3,7 @@ "displayName": "%extension.displayName%", "description": "%extension.description%", "publisher": "matterai", - "version": "5.3.3", + "version": "5.3.4", "icon": "assets/icons/matterai-ic.png", "galleryBanner": { "color": "#FFFFFF",