Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,8 @@ export class McpListWidget extends Disposable {
private galleryServers: IWorkbenchMcpServer[] = [];
private searchQuery: string = '';
private browseMode: boolean = false;
private lastHeight: number = 0;
private lastWidth: number = 0;
private readonly collapsedGroups = new Set<string>();
private galleryCts: CancellationTokenSource | undefined;
private readonly delayedFilter = new Delayer<void>(200);
Expand Down Expand Up @@ -608,6 +610,11 @@ export class McpListWidget extends Disposable {
this.galleryServers = [];
this.filterServers();
}

// Re-layout to account for the back link height change
if (this.lastHeight > 0) {
this.layout(this.lastHeight, this.lastWidth);
}
}

private async queryGallery(): Promise<void> {
Expand Down Expand Up @@ -882,6 +889,8 @@ export class McpListWidget extends Disposable {
* Layouts the widget.
*/
layout(height: number, width: number): void {
this.lastHeight = height;
this.lastWidth = width;
const sectionFooterHeight = this.sectionHeader.offsetHeight || 0;
const searchBarHeight = this.searchAndButtonContainer.offsetHeight || 52;
const backLinkHeight = this.browseMode ? (this.backLink.offsetHeight || 28) : 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,8 @@ export class PluginListWidget extends Disposable {
private marketplaceItems: IMarketplacePluginItem[] = [];
private searchQuery: string = '';
private browseMode: boolean = false;
private lastHeight: number = 0;
private lastWidth: number = 0;
private readonly collapsedGroups = new Set<string>();
private marketplaceCts: CancellationTokenSource | undefined;
private readonly delayedFilter = new Delayer<void>(200);
Expand Down Expand Up @@ -519,6 +521,11 @@ export class PluginListWidget extends Disposable {
this.marketplaceItems = [];
this.filterPlugins();
}

// Re-layout to account for the back link height change
if (this.lastHeight > 0) {
this.layout(this.lastHeight, this.lastWidth);
}
}

private async queryMarketplace(): Promise<void> {
Expand Down Expand Up @@ -692,6 +699,8 @@ export class PluginListWidget extends Disposable {
}

layout(height: number, width: number): void {
this.lastHeight = height;
this.lastWidth = width;
const sectionFooterHeight = this.sectionHeader.offsetHeight || 0;
const searchBarHeight = this.searchAndButtonContainer.offsetHeight || 52;
const backLinkHeight = this.browseMode ? (this.backLink.offsetHeight || 28) : 0;
Expand Down
Loading