-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Batch settings updates from the webview to the extension host #9165
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
Changes from 4 commits
7b50159
e217942
85a478c
e6f8e3c
3f96731
9804568
697c12b
cea5d7b
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 |
|---|---|---|
|
|
@@ -145,6 +145,10 @@ export class ClineProvider | |
| private pendingOperations: Map<string, PendingEditOperation> = new Map() | ||
| private static readonly PENDING_OPERATION_TIMEOUT_MS = 30000 // 30 seconds | ||
|
|
||
| private cloudOrganizationsCache: CloudOrganizationMembership[] | null = null | ||
| private cloudOrganizationsCacheTimestamp: number | null = null | ||
| private static readonly CLOUD_ORGANIZATIONS_CACHE_DURATION_MS = 5 * 60 * 1000 // 5 minutes | ||
|
|
||
| public isViewLaunched = false | ||
| public settingsImportedAt?: number | ||
| public readonly latestAnnouncementId = "nov-2025-v3.30.0-pr-fixer" // v3.30.0 PR Fixer announcement | ||
|
|
@@ -1918,7 +1922,19 @@ export class ClineProvider | |
|
|
||
| try { | ||
| if (!CloudService.instance.isCloudAgent) { | ||
| cloudOrganizations = await CloudService.instance.getOrganizationMemberships() | ||
| const now = Date.now() | ||
|
|
||
| if ( | ||
| this.cloudOrganizationsCache !== null && | ||
| this.cloudOrganizationsCacheTimestamp !== null && | ||
| now - this.cloudOrganizationsCacheTimestamp < ClineProvider.CLOUD_ORGANIZATIONS_CACHE_DURATION_MS | ||
| ) { | ||
| cloudOrganizations = this.cloudOrganizationsCache! | ||
| } else { | ||
| cloudOrganizations = await CloudService.instance.getOrganizationMemberships() | ||
| this.cloudOrganizationsCache = cloudOrganizations | ||
| this.cloudOrganizationsCacheTimestamp = now | ||
| } | ||
|
Comment on lines
1920
to
+1938
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. The organization cache may store empty arrays from failed API calls for 5 minutes. When Consider checking if the result is a legitimate empty array (user has no orgs) vs an error case before caching, or add cache invalidation on auth state changes. Fix it with Roo Code or mention @roomote and request a fix.
Collaborator
Author
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. @roomote Please fix this by throwing in
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.
Fixed the reported issue. All local checks passed. |
||
| } | ||
| } catch (error) { | ||
| // Ignore this error. | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.