@codingame/monaco-vscode-mcp-service-override 31.0.0 → 32.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/package.json +2 -2
  2. package/vscode/src/vs/platform/mcp/common/allowedMcpServersService.js +1 -1
  3. package/vscode/src/vs/platform/mcp/common/mcpGalleryService.js +2 -2
  4. package/vscode/src/vs/workbench/contrib/mcp/browser/mcp.contribution.js +7 -11
  5. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpAddContextContribution.js +2 -2
  6. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpCommands.js +80 -80
  7. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpElicitationService.js +25 -25
  8. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpLanguageFeatures.js +47 -25
  9. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpMigration.js +4 -4
  10. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpResourceQuickAccess.js +8 -8
  11. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServerEditor.d.ts +72 -0
  12. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServerEditor.js +1023 -0
  13. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServerEditorInput.d.ts +17 -0
  14. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServerEditorInput.js +49 -0
  15. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServerIcons.d.ts +5 -0
  16. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServerIcons.js +12 -0
  17. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServerWidgets.d.ts +88 -0
  18. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServerWidgets.js +372 -0
  19. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpWorkbenchService.js +11 -11
  20. package/vscode/src/vs/workbench/contrib/mcp/browser/media/mcpServerEditor.css +98 -0
  21. package/vscode/src/vs/workbench/contrib/mcp/common/discovery/extensionMcpDiscovery.js +6 -5
  22. package/vscode/src/vs/workbench/contrib/mcp/common/discovery/installedMcpServersDiscovery.js +2 -2
  23. package/vscode/src/vs/workbench/contrib/mcp/common/discovery/nativeMcpDiscoveryAbstract.js +3 -3
  24. package/vscode/src/vs/workbench/contrib/mcp/common/discovery/pluginMcpDiscovery.js +2 -2
  25. package/vscode/src/vs/workbench/contrib/mcp/common/discovery/workspaceDotMcpDiscovery.d.ts +21 -0
  26. package/vscode/src/vs/workbench/contrib/mcp/common/discovery/workspaceDotMcpDiscovery.js +92 -0
  27. package/vscode/src/vs/workbench/contrib/mcp/common/discovery/workspaceMcpDiscoveryAdapter.js +2 -2
  28. package/vscode/src/vs/workbench/contrib/mcp/common/mcpContextKeys.js +4 -4
  29. package/vscode/src/vs/workbench/contrib/mcp/common/mcpLanguageModelToolContribution.js +10 -8
  30. package/vscode/src/vs/workbench/contrib/mcp/common/mcpRegistry.js +14 -14
  31. package/vscode/src/vs/workbench/contrib/mcp/common/mcpSamplingLog.js +1 -1
  32. package/vscode/src/vs/workbench/contrib/mcp/common/mcpSamplingService.js +11 -11
  33. package/vscode/src/vs/workbench/contrib/mcp/common/mcpSandboxService.js +4 -4
  34. package/vscode/src/vs/workbench/contrib/mcp/common/mcpServerConnection.js +3 -3
  35. package/vscode/src/vs/workbench/contrib/mcp/common/mcpService.d.ts +28 -3
  36. package/vscode/src/vs/workbench/contrib/mcp/common/mcpService.js +88 -3
  37. package/vscode/src/vs/workbench/services/authentication/browser/authenticationMcpService.js +9 -9
  38. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServersView.d.ts +0 -59
  39. package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServersView.js +0 -576
  40. package/vscode/src/vs/workbench/contrib/mcp/browser/media/mcpServersView.css +0 -53
@@ -0,0 +1,17 @@
1
+ import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
2
+ import { EditorInputCapabilities, IUntypedEditorInput } from "@codingame/monaco-vscode-api/vscode/vs/workbench/common/editor";
3
+ import { EditorInput } from "@codingame/monaco-vscode-api/vscode/vs/workbench/common/editor/editorInput";
4
+ import { ThemeIcon } from "@codingame/monaco-vscode-api/vscode/vs/base/common/themables";
5
+ import { IWorkbenchMcpServer } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/mcp/common/mcpTypes";
6
+ export declare class McpServerEditorInput extends EditorInput {
7
+ private _mcpServer;
8
+ static readonly ID = "workbench.mcpServer.input2";
9
+ get typeId(): string;
10
+ get capabilities(): EditorInputCapabilities;
11
+ get resource(): URI;
12
+ constructor(_mcpServer: IWorkbenchMcpServer);
13
+ get mcpServer(): IWorkbenchMcpServer;
14
+ getName(): string;
15
+ getIcon(): ThemeIcon | undefined;
16
+ matches(other: EditorInput | IUntypedEditorInput): boolean;
17
+ }
@@ -0,0 +1,49 @@
1
+
2
+ import { Schemas } from '@codingame/monaco-vscode-api/vscode/vs/base/common/network';
3
+ import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
4
+ import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
5
+ import { EditorInputCapabilities } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/editor';
6
+ import { EditorInput } from '@codingame/monaco-vscode-api/vscode/vs/workbench/common/editor/editorInput';
7
+ import { join } from '@codingame/monaco-vscode-api/vscode/vs/base/common/path';
8
+ import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
9
+ import { registerIcon } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/iconRegistry';
10
+
11
+ const MCPServerEditorIcon = registerIcon("mcp-server-editor-icon", Codicon.mcp, ( localize(11103, "Icon of the MCP Server editor.")));
12
+ class McpServerEditorInput extends EditorInput {
13
+ static {
14
+ this.ID = "workbench.mcpServer.input2";
15
+ }
16
+ get typeId() {
17
+ return McpServerEditorInput.ID;
18
+ }
19
+ get capabilities() {
20
+ return EditorInputCapabilities.Readonly | EditorInputCapabilities.Singleton;
21
+ }
22
+ get resource() {
23
+ return ( URI.from({
24
+ scheme: Schemas.extension,
25
+ path: join(this.mcpServer.id, "mcpServer")
26
+ }));
27
+ }
28
+ constructor(_mcpServer) {
29
+ super();
30
+ this._mcpServer = _mcpServer;
31
+ }
32
+ get mcpServer() {
33
+ return this._mcpServer;
34
+ }
35
+ getName() {
36
+ return localize(11104, "MCP Server: {0}", this._mcpServer.label);
37
+ }
38
+ getIcon() {
39
+ return MCPServerEditorIcon;
40
+ }
41
+ matches(other) {
42
+ if (super.matches(other)) {
43
+ return true;
44
+ }
45
+ return other instanceof McpServerEditorInput && this._mcpServer.id === other._mcpServer.id;
46
+ }
47
+ }
48
+
49
+ export { McpServerEditorInput };
@@ -0,0 +1,5 @@
1
+ export declare const mcpServerIcon: import("@codingame/monaco-vscode-api/vscode/vs/base/common/themables").ThemeIcon;
2
+ export declare const mcpServerRemoteIcon: import("@codingame/monaco-vscode-api/vscode/vs/base/common/themables").ThemeIcon;
3
+ export declare const mcpServerWorkspaceIcon: import("@codingame/monaco-vscode-api/vscode/vs/base/common/themables").ThemeIcon;
4
+ export declare const mcpStarredIcon: import("@codingame/monaco-vscode-api/vscode/vs/base/common/themables").ThemeIcon;
5
+ export declare const mcpLicenseIcon: import("@codingame/monaco-vscode-api/vscode/vs/base/common/themables").ThemeIcon;
@@ -0,0 +1,12 @@
1
+
2
+ import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
3
+ import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
4
+ import { registerIcon } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/iconRegistry';
5
+
6
+ const mcpServerIcon = registerIcon("mcp-server", Codicon.mcp, ( localize(11105, "Icon used for the MCP server.")));
7
+ const mcpServerRemoteIcon = registerIcon("mcp-server-remote", Codicon.remote, ( localize(11106, "Icon to indicate that an MCP server is for the remote user scope.")));
8
+ const mcpServerWorkspaceIcon = registerIcon("mcp-server-workspace", Codicon.rootFolder, ( localize(11107, "Icon to indicate that an MCP server is for the workspace scope.")));
9
+ const mcpStarredIcon = registerIcon("mcp-server-starred", Codicon.starFull, ( localize(11108, "Icon shown along with the starred status.")));
10
+ const mcpLicenseIcon = registerIcon("mcp-server-license", Codicon.law, ( localize(11109, "Icon shown along with the license status.")));
11
+
12
+ export { mcpLicenseIcon, mcpServerIcon, mcpServerRemoteIcon, mcpServerWorkspaceIcon, mcpStarredIcon };
@@ -0,0 +1,88 @@
1
+ import { Disposable, IDisposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
2
+ import { IHoverService } from "@codingame/monaco-vscode-api/vscode/vs/platform/hover/browser/hover.service";
3
+ import { IOpenerService } from "@codingame/monaco-vscode-api/vscode/vs/platform/opener/common/opener.service";
4
+ import { IMcpServerContainer, IWorkbenchMcpServer } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/mcp/common/mcpTypes";
5
+ import { IThemeService } from "@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/themeService.service";
6
+ import { Event } from "@codingame/monaco-vscode-api/vscode/vs/base/common/event";
7
+ import { McpServerStatusAction } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/mcp/browser/mcpServerActions";
8
+ import { ExtensionHoverOptions } from "@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/extensions/browser/extensionsWidgets";
9
+ import { IConfigurationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configuration.service";
10
+ import { IInstantiationService } from "@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation";
11
+ import { IMarkdownRendererService } from "@codingame/monaco-vscode-api/vscode/vs/platform/markdown/browser/markdownRenderer.service";
12
+ export declare abstract class McpServerWidget extends Disposable implements IMcpServerContainer {
13
+ private _mcpServer;
14
+ get mcpServer(): IWorkbenchMcpServer | null;
15
+ set mcpServer(mcpServer: IWorkbenchMcpServer | null);
16
+ update(): void;
17
+ abstract render(): void;
18
+ }
19
+ export declare function onClick(element: HTMLElement, callback: () => void): IDisposable;
20
+ export declare class McpServerIconWidget extends McpServerWidget {
21
+ private readonly themeService;
22
+ private readonly iconLoadingDisposable;
23
+ private readonly element;
24
+ private readonly iconElement;
25
+ private readonly codiconIconElement;
26
+ private iconUrl;
27
+ constructor(container: HTMLElement, themeService: IThemeService);
28
+ private clear;
29
+ render(): void;
30
+ }
31
+ export declare class PublisherWidget extends McpServerWidget {
32
+ readonly container: HTMLElement;
33
+ private small;
34
+ private readonly hoverService;
35
+ private readonly openerService;
36
+ private element;
37
+ private containerHover;
38
+ private readonly disposables;
39
+ constructor(container: HTMLElement, small: boolean, hoverService: IHoverService, openerService: IOpenerService);
40
+ private clear;
41
+ render(): void;
42
+ }
43
+ export declare class StarredWidget extends McpServerWidget {
44
+ readonly container: HTMLElement;
45
+ private small;
46
+ private readonly disposables;
47
+ constructor(container: HTMLElement, small: boolean);
48
+ private clear;
49
+ render(): void;
50
+ static getCountLabel(starsCount: number): string;
51
+ }
52
+ export declare class LicenseWidget extends McpServerWidget {
53
+ readonly container: HTMLElement;
54
+ private readonly disposables;
55
+ constructor(container: HTMLElement);
56
+ private clear;
57
+ render(): void;
58
+ }
59
+ export declare class McpServerHoverWidget extends McpServerWidget {
60
+ private readonly options;
61
+ private readonly mcpServerStatusAction;
62
+ private readonly hoverService;
63
+ private readonly configurationService;
64
+ private readonly hover;
65
+ constructor(options: ExtensionHoverOptions, mcpServerStatusAction: McpServerStatusAction, hoverService: IHoverService, configurationService: IConfigurationService);
66
+ render(): void;
67
+ private getHoverMarkdown;
68
+ }
69
+ export declare class McpServerScopeBadgeWidget extends McpServerWidget {
70
+ readonly container: HTMLElement;
71
+ private readonly instantiationService;
72
+ private readonly badge;
73
+ private element;
74
+ constructor(container: HTMLElement, instantiationService: IInstantiationService);
75
+ private clear;
76
+ render(): void;
77
+ }
78
+ export declare class McpServerStatusWidget extends McpServerWidget {
79
+ private readonly container;
80
+ private readonly extensionStatusAction;
81
+ private readonly markdownRendererService;
82
+ private readonly renderDisposables;
83
+ private readonly _onDidRender;
84
+ readonly onDidRender: Event<void>;
85
+ constructor(container: HTMLElement, extensionStatusAction: McpServerStatusAction, markdownRendererService: IMarkdownRendererService);
86
+ render(): void;
87
+ }
88
+ export declare const mcpStarredIconColor: string;
@@ -0,0 +1,372 @@
1
+
2
+ import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
3
+ import { addDisposableListener, EventType, finalHandler, append, $, reset } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/dom';
4
+ import { StandardKeyboardEvent } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/keyboardEvent';
5
+ import { getDefaultHoverDelegate } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/hover/hoverDelegateFactory';
6
+ import { renderIcon } from '@codingame/monaco-vscode-api/vscode/vs/base/browser/ui/iconLabel/iconLabels';
7
+ import { KeyCode } from '@codingame/monaco-vscode-api/vscode/vs/base/common/keyCodes';
8
+ import { Disposable, DisposableStore, MutableDisposable, toDisposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
9
+ import { ThemeIcon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/themables';
10
+ import { URI } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uri';
11
+ import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
12
+ import { IHoverService } from '@codingame/monaco-vscode-api/vscode/vs/platform/hover/browser/hover.service';
13
+ import { IOpenerService } from '@codingame/monaco-vscode-api/vscode/vs/platform/opener/common/opener.service';
14
+ import { verifiedPublisherIcon } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/extensionManagement/common/extensionsIcons';
15
+ import { McpServerInstallState } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/mcp/common/mcpTypes';
16
+ import { registerThemingParticipant } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/themeService';
17
+ import { IThemeService } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/themeService.service';
18
+ import { isDark } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/theme';
19
+ import { Emitter } from '@codingame/monaco-vscode-api/vscode/vs/base/common/event';
20
+ import { mcpServerIcon, mcpStarredIcon, mcpLicenseIcon, mcpServerRemoteIcon, mcpServerWorkspaceIcon } from './mcpServerIcons.js';
21
+ import { MarkdownString } from '@codingame/monaco-vscode-api/vscode/vs/base/common/htmlContent';
22
+ import { ExtensionIconBadge } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/extensions/browser/extensionsWidgets';
23
+ import { IInstantiationService } from '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
24
+ import { LocalMcpServerScope } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/mcp/common/mcpWorkbenchManagementService';
25
+ import { registerColor } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colorUtils';
26
+ import { textLinkForeground } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/baseColors';
27
+ import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/chartsColors';
28
+ import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/editorColors';
29
+ import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/inputColors';
30
+ import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/listColors';
31
+ import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/menuColors';
32
+ import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/minimapColors';
33
+ import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/miscColors';
34
+ import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/quickpickColors';
35
+ import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/searchColors';
36
+ import { IMarkdownRendererService } from '@codingame/monaco-vscode-api/vscode/vs/platform/markdown/browser/markdownRenderer.service';
37
+
38
+ class McpServerWidget extends Disposable {
39
+ constructor() {
40
+ super(...arguments);
41
+ this._mcpServer = null;
42
+ }
43
+ get mcpServer() {
44
+ return this._mcpServer;
45
+ }
46
+ set mcpServer(mcpServer) {
47
+ this._mcpServer = mcpServer;
48
+ this.update();
49
+ }
50
+ update() {
51
+ this.render();
52
+ }
53
+ }
54
+ function onClick(element, callback) {
55
+ const disposables = ( new DisposableStore());
56
+ disposables.add(
57
+ addDisposableListener(element, EventType.CLICK, finalHandler(callback))
58
+ );
59
+ disposables.add(addDisposableListener(element, EventType.KEY_UP, e => {
60
+ const keyboardEvent = ( new StandardKeyboardEvent(e));
61
+ if (keyboardEvent.equals(KeyCode.Space) || keyboardEvent.equals(KeyCode.Enter)) {
62
+ e.preventDefault();
63
+ e.stopPropagation();
64
+ callback();
65
+ }
66
+ }));
67
+ return disposables;
68
+ }
69
+ let McpServerIconWidget = class McpServerIconWidget extends McpServerWidget {
70
+ constructor(container, themeService) {
71
+ super();
72
+ this.themeService = themeService;
73
+ this.iconLoadingDisposable = this._register(( new MutableDisposable()));
74
+ this.element = append(container, $(".extension-icon"));
75
+ this.iconElement = append(this.element, $("img.icon", {
76
+ alt: ""
77
+ }));
78
+ this.iconElement.style.display = "none";
79
+ this.codiconIconElement = append(this.element, $(ThemeIcon.asCSSSelector(mcpServerIcon)));
80
+ this.codiconIconElement.style.display = "none";
81
+ this.render();
82
+ this._register(toDisposable(() => this.clear()));
83
+ this._register(this.themeService.onDidColorThemeChange(() => this.render()));
84
+ }
85
+ clear() {
86
+ this.iconUrl = undefined;
87
+ this.iconElement.src = "";
88
+ this.iconElement.style.display = "none";
89
+ this.codiconIconElement.style.display = "none";
90
+ this.codiconIconElement.className = ThemeIcon.asClassName(mcpServerIcon);
91
+ this.iconLoadingDisposable.clear();
92
+ }
93
+ render() {
94
+ if (!this.mcpServer) {
95
+ this.clear();
96
+ return;
97
+ }
98
+ if (this.mcpServer.icon) {
99
+ const type = this.themeService.getColorTheme().type;
100
+ const iconUrl = isDark(type) ? this.mcpServer.icon.dark : this.mcpServer.icon.light;
101
+ if (this.iconUrl !== iconUrl) {
102
+ this.iconElement.style.display = "inherit";
103
+ this.codiconIconElement.style.display = "none";
104
+ this.iconUrl = iconUrl;
105
+ this.iconLoadingDisposable.value = addDisposableListener(this.iconElement, "error", () => {
106
+ this.iconElement.style.display = "none";
107
+ this.codiconIconElement.style.display = "inherit";
108
+ }, {
109
+ once: true
110
+ });
111
+ this.iconElement.src = this.iconUrl;
112
+ if (!this.iconElement.complete) {
113
+ this.iconElement.style.visibility = "hidden";
114
+ this.iconElement.onload = () => this.iconElement.style.visibility = "inherit";
115
+ } else {
116
+ this.iconElement.style.visibility = "inherit";
117
+ }
118
+ }
119
+ } else {
120
+ this.iconUrl = undefined;
121
+ this.iconElement.style.display = "none";
122
+ this.iconElement.src = "";
123
+ this.codiconIconElement.className = this.mcpServer.codicon ? `codicon ${this.mcpServer.codicon}` : ThemeIcon.asClassName(mcpServerIcon);
124
+ this.codiconIconElement.style.display = "inherit";
125
+ this.iconLoadingDisposable.clear();
126
+ }
127
+ }
128
+ };
129
+ McpServerIconWidget = ( __decorate([( __param(1, IThemeService))], McpServerIconWidget));
130
+ let PublisherWidget = class PublisherWidget extends McpServerWidget {
131
+ constructor(container, small, hoverService, openerService) {
132
+ super();
133
+ this.container = container;
134
+ this.small = small;
135
+ this.hoverService = hoverService;
136
+ this.openerService = openerService;
137
+ this.disposables = this._register(( new DisposableStore()));
138
+ this.render();
139
+ this._register(toDisposable(() => this.clear()));
140
+ }
141
+ clear() {
142
+ this.element?.remove();
143
+ this.disposables.clear();
144
+ }
145
+ render() {
146
+ this.clear();
147
+ if (!this.mcpServer?.publisherDisplayName) {
148
+ return;
149
+ }
150
+ this.element = append(this.container, $(".publisher"));
151
+ const publisherDisplayName = $(".publisher-name.ellipsis");
152
+ publisherDisplayName.textContent = this.mcpServer.publisherDisplayName;
153
+ const verifiedPublisher = $(".verified-publisher");
154
+ append(
155
+ verifiedPublisher,
156
+ $("span.extension-verified-publisher.clickable"),
157
+ renderIcon(verifiedPublisherIcon)
158
+ );
159
+ if (this.small) {
160
+ if (this.mcpServer.gallery?.publisherDomain?.verified) {
161
+ append(this.element, verifiedPublisher);
162
+ }
163
+ append(this.element, publisherDisplayName);
164
+ } else {
165
+ this.element.classList.toggle("clickable", !!this.mcpServer.gallery?.publisherUrl);
166
+ this.element.setAttribute("role", "button");
167
+ this.element.tabIndex = 0;
168
+ this.containerHover = this.disposables.add(
169
+ this.hoverService.setupManagedHover(getDefaultHoverDelegate("mouse"), this.element, ( localize(11110, "Publisher ({0})", this.mcpServer.publisherDisplayName)))
170
+ );
171
+ append(this.element, publisherDisplayName);
172
+ if (this.mcpServer.gallery?.publisherDomain?.verified) {
173
+ append(this.element, verifiedPublisher);
174
+ const publisherDomainLink = ( URI.parse(this.mcpServer.gallery?.publisherDomain.link));
175
+ verifiedPublisher.tabIndex = 0;
176
+ verifiedPublisher.setAttribute("role", "button");
177
+ this.containerHover.update(( localize(
178
+ 11111,
179
+ "This publisher has verified ownership of {0}",
180
+ this.mcpServer.gallery?.publisherDomain.link
181
+ )));
182
+ verifiedPublisher.setAttribute("role", "link");
183
+ append(verifiedPublisher, $(
184
+ "span.extension-verified-publisher-domain",
185
+ undefined,
186
+ publisherDomainLink.authority.startsWith("www.") ? publisherDomainLink.authority.substring(4) : publisherDomainLink.authority
187
+ ));
188
+ this.disposables.add(
189
+ onClick(verifiedPublisher, () => this.openerService.open(publisherDomainLink))
190
+ );
191
+ }
192
+ if (this.mcpServer.gallery?.publisherUrl) {
193
+ this.disposables.add(onClick(
194
+ this.element,
195
+ () => this.openerService.open(this.mcpServer?.gallery?.publisherUrl)
196
+ ));
197
+ }
198
+ }
199
+ }
200
+ };
201
+ PublisherWidget = ( __decorate([( __param(2, IHoverService)), ( __param(3, IOpenerService))], PublisherWidget));
202
+ class StarredWidget extends McpServerWidget {
203
+ constructor(container, small) {
204
+ super();
205
+ this.container = container;
206
+ this.small = small;
207
+ this.disposables = this._register(( new DisposableStore()));
208
+ this.container.classList.add("extension-ratings");
209
+ if (this.small) {
210
+ container.classList.add("small");
211
+ }
212
+ this.render();
213
+ this._register(toDisposable(() => this.clear()));
214
+ }
215
+ clear() {
216
+ this.container.innerText = "";
217
+ this.disposables.clear();
218
+ }
219
+ render() {
220
+ this.clear();
221
+ if (!this.mcpServer?.starsCount) {
222
+ return;
223
+ }
224
+ if (this.small && this.mcpServer.installState !== McpServerInstallState.Uninstalled) {
225
+ return;
226
+ }
227
+ const parent = this.small ? this.container : append(this.container, $("span.rating", {
228
+ tabIndex: 0
229
+ }));
230
+ append(parent, $("span" + ThemeIcon.asCSSSelector(mcpStarredIcon)));
231
+ const ratingCountElement = append(parent, $(
232
+ "span.count",
233
+ undefined,
234
+ StarredWidget.getCountLabel(this.mcpServer.starsCount)
235
+ ));
236
+ if (!this.small) {
237
+ ratingCountElement.style.paddingLeft = "3px";
238
+ }
239
+ }
240
+ static getCountLabel(starsCount) {
241
+ if (starsCount > 1000000) {
242
+ return `${Math.floor(starsCount / 100000) / 10}M`;
243
+ } else if (starsCount > 1000) {
244
+ return `${Math.floor(starsCount / 1000)}K`;
245
+ } else {
246
+ return String(starsCount);
247
+ }
248
+ }
249
+ }
250
+ class LicenseWidget extends McpServerWidget {
251
+ constructor(container) {
252
+ super();
253
+ this.container = container;
254
+ this.disposables = this._register(( new DisposableStore()));
255
+ this.container.classList.add("license");
256
+ this.render();
257
+ this._register(toDisposable(() => this.clear()));
258
+ }
259
+ clear() {
260
+ this.container.innerText = "";
261
+ this.disposables.clear();
262
+ }
263
+ render() {
264
+ this.clear();
265
+ if (!this.mcpServer?.license) {
266
+ return;
267
+ }
268
+ const parent = append(this.container, $("span.license", {
269
+ tabIndex: 0
270
+ }));
271
+ append(parent, $("span" + ThemeIcon.asCSSSelector(mcpLicenseIcon)));
272
+ const licenseElement = append(parent, $("span", undefined, this.mcpServer.license));
273
+ licenseElement.style.paddingLeft = "3px";
274
+ }
275
+ }
276
+ let McpServerScopeBadgeWidget = class McpServerScopeBadgeWidget extends McpServerWidget {
277
+ constructor(container, instantiationService) {
278
+ super();
279
+ this.container = container;
280
+ this.instantiationService = instantiationService;
281
+ this.badge = this._register(( new MutableDisposable()));
282
+ this.element = append(this.container, $(""));
283
+ this.render();
284
+ this._register(toDisposable(() => this.clear()));
285
+ }
286
+ clear() {
287
+ this.badge.value?.element.remove();
288
+ this.badge.clear();
289
+ }
290
+ render() {
291
+ this.clear();
292
+ const scope = this.mcpServer?.local?.scope;
293
+ if (!scope || scope === LocalMcpServerScope.User) {
294
+ return;
295
+ }
296
+ let icon;
297
+ switch (scope) {
298
+ case LocalMcpServerScope.Workspace:
299
+ {
300
+ icon = mcpServerWorkspaceIcon;
301
+ break;
302
+ }
303
+ case LocalMcpServerScope.RemoteUser:
304
+ {
305
+ icon = mcpServerRemoteIcon;
306
+ break;
307
+ }
308
+ }
309
+ this.badge.value = this.instantiationService.createInstance(ExtensionIconBadge, icon, undefined);
310
+ append(this.element, this.badge.value.element);
311
+ }
312
+ };
313
+ McpServerScopeBadgeWidget = ( __decorate([( __param(1, IInstantiationService))], McpServerScopeBadgeWidget));
314
+ let McpServerStatusWidget = class McpServerStatusWidget extends McpServerWidget {
315
+ constructor(container, extensionStatusAction, markdownRendererService) {
316
+ super();
317
+ this.container = container;
318
+ this.extensionStatusAction = extensionStatusAction;
319
+ this.markdownRendererService = markdownRendererService;
320
+ this.renderDisposables = this._register(( new MutableDisposable()));
321
+ this._onDidRender = this._register(( new Emitter()));
322
+ this.onDidRender = this._onDidRender.event;
323
+ this.render();
324
+ this._register(extensionStatusAction.onDidChangeStatus(() => this.render()));
325
+ }
326
+ render() {
327
+ reset(this.container);
328
+ this.renderDisposables.value = undefined;
329
+ const disposables = ( new DisposableStore());
330
+ this.renderDisposables.value = disposables;
331
+ const extensionStatus = this.extensionStatusAction.status;
332
+ if (extensionStatus.length) {
333
+ const markdown = ( new MarkdownString("", {
334
+ isTrusted: true,
335
+ supportThemeIcons: true
336
+ }));
337
+ for (let i = 0; i < extensionStatus.length; i++) {
338
+ const status = extensionStatus[i];
339
+ if (status.icon) {
340
+ markdown.appendMarkdown(`$(${status.icon.id})&nbsp;`);
341
+ }
342
+ markdown.appendMarkdown(status.message.value);
343
+ if (i < extensionStatus.length - 1) {
344
+ markdown.appendText(`\n`);
345
+ }
346
+ }
347
+ const rendered = disposables.add(this.markdownRendererService.render(markdown));
348
+ append(this.container, rendered.element);
349
+ }
350
+ this._onDidRender.fire();
351
+ }
352
+ };
353
+ McpServerStatusWidget = ( __decorate([( __param(2, IMarkdownRendererService))], McpServerStatusWidget));
354
+ const mcpStarredIconColor = registerColor("mcpIcon.starForeground", {
355
+ light: "#DF6100",
356
+ dark: "#FF8E00",
357
+ hcDark: "#FF8E00",
358
+ hcLight: textLinkForeground
359
+ }, ( localize(11112, "The icon color for mcp starred.")), false);
360
+ registerThemingParticipant((theme, collector) => {
361
+ const mcpStarredIconColorValue = theme.getColor(mcpStarredIconColor);
362
+ if (mcpStarredIconColorValue) {
363
+ collector.addRule(
364
+ `.extension-ratings .codicon-mcp-server-starred { color: ${mcpStarredIconColorValue}; }`
365
+ );
366
+ collector.addRule(
367
+ `.monaco-hover.extension-hover .markdown-hover .hover-contents ${ThemeIcon.asCSSSelector(mcpStarredIcon)} { color: ${mcpStarredIconColorValue}; }`
368
+ );
369
+ }
370
+ });
371
+
372
+ export { LicenseWidget, McpServerIconWidget, McpServerScopeBadgeWidget, McpServerStatusWidget, McpServerWidget, PublisherWidget, StarredWidget, mcpStarredIconColor, onClick };
@@ -35,7 +35,7 @@ import { mcpConfigurationSection } from '@codingame/monaco-vscode-api/vscode/vs/
35
35
  import { McpServerEnablementState, McpCollectionSortOrder, McpServerInstallState, McpServersGalleryStatusContext, HasInstalledMcpServersContext } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/mcp/common/mcpTypes';
36
36
  import { IMcpService, IMcpWorkbenchService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/mcp/common/mcpTypes.service';
37
37
  import { ContributionEnablementState } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/chat/common/enablement';
38
- import { McpServerEditorInput } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/mcp/browser/mcpServerEditorInput';
38
+ import { McpServerEditorInput } from './mcpServerEditorInput.js';
39
39
  import { IMcpGalleryManifestService } from '@codingame/monaco-vscode-api/vscode/vs/platform/mcp/common/mcpGalleryManifest.service';
40
40
  import { IExtensionsWorkbenchService } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/extensions/common/extensions.service';
41
41
  import '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/index';
@@ -450,7 +450,7 @@ let McpWorkbenchService = class McpWorkbenchService extends Disposable {
450
450
  const existing = result.get(server.name);
451
451
  if (existing) {
452
452
  this.logService.warn(( localize(
453
- 10811,
453
+ 11113,
454
454
  "Overwriting mcp server '{0}' from {1} with {2}.",
455
455
  server.name,
456
456
  server.mcpResource.path,
@@ -463,7 +463,7 @@ let McpWorkbenchService = class McpWorkbenchService extends Disposable {
463
463
  const existing = result.get(server.name);
464
464
  if (existing) {
465
465
  this.logService.warn(( localize(
466
- 10811,
466
+ 11113,
467
467
  "Overwriting mcp server '{0}' from {1} with {2}.",
468
468
  server.name,
469
469
  server.mcpResource.path,
@@ -476,7 +476,7 @@ let McpWorkbenchService = class McpWorkbenchService extends Disposable {
476
476
  }
477
477
  canInstall(mcpServer) {
478
478
  if (!(mcpServer instanceof McpWorkbenchServer)) {
479
- return ( new MarkdownString()).appendText(( localize(10812, "The provided object is not an mcp server.")));
479
+ return ( new MarkdownString()).appendText(( localize(11114, "The provided object is not an mcp server.")));
480
480
  }
481
481
  if (mcpServer.gallery) {
482
482
  const result = this.mcpManagementService.canInstall(mcpServer.gallery);
@@ -493,7 +493,7 @@ let McpWorkbenchService = class McpWorkbenchService extends Disposable {
493
493
  return result;
494
494
  }
495
495
  return ( new MarkdownString()).appendText(( localize(
496
- 10813,
496
+ 11115,
497
497
  "Cannot install the '{0}' MCP Server because it is not available in this setup.",
498
498
  mcpServer.label
499
499
  )));
@@ -600,7 +600,7 @@ let McpWorkbenchService = class McpWorkbenchService extends Disposable {
600
600
  id: USER_CONFIG_ID,
601
601
  key: "userLocalValue",
602
602
  target: ConfigurationTarget.USER_LOCAL,
603
- label: ( localize(10814, "Global in {0}", this.productService.nameShort)),
603
+ label: ( localize(11116, "Global in {0}", this.productService.nameShort)),
604
604
  scope: StorageScope.PROFILE,
605
605
  order: McpCollectionSortOrder.User,
606
606
  uri: mcpResource,
@@ -789,7 +789,7 @@ let McpWorkbenchService = class McpWorkbenchService extends Disposable {
789
789
  state: McpServerEnablementState.DisabledProfile,
790
790
  message: {
791
791
  severity: Severity.Info,
792
- text: ( new MarkdownString(( localize(10815, "This MCP server is disabled."))))
792
+ text: ( new MarkdownString(( localize(11117, "This MCP server is disabled."))))
793
793
  }
794
794
  };
795
795
  }
@@ -798,7 +798,7 @@ let McpWorkbenchService = class McpWorkbenchService extends Disposable {
798
798
  state: McpServerEnablementState.DisabledWorkspace,
799
799
  message: {
800
800
  severity: Severity.Info,
801
- text: ( new MarkdownString(( localize(10816, "This MCP server is disabled for this workspace."))))
801
+ text: ( new MarkdownString(( localize(11118, "This MCP server is disabled for this workspace."))))
802
802
  }
803
803
  };
804
804
  }
@@ -818,7 +818,7 @@ let McpWorkbenchService = class McpWorkbenchService extends Disposable {
818
818
  message: {
819
819
  severity: Severity.Warning,
820
820
  text: ( new MarkdownString(( localize(
821
- 10817,
821
+ 11119,
822
822
  "This MCP Server is disabled because MCP servers are configured to be disabled in the Editor. Please check your [settings]({0}).",
823
823
  settingsCommandLink
824
824
  ))))
@@ -832,7 +832,7 @@ let McpWorkbenchService = class McpWorkbenchService extends Disposable {
832
832
  message: {
833
833
  severity: Severity.Warning,
834
834
  text: ( new MarkdownString(( localize(
835
- 10818,
835
+ 11120,
836
836
  "This MCP Server is disabled because it is configured to be disabled in the Editor. Please check your [settings]({0}).",
837
837
  settingsCommandLink
838
838
  ))))
@@ -846,7 +846,7 @@ let McpWorkbenchService = class McpWorkbenchService extends Disposable {
846
846
  message: {
847
847
  severity: Severity.Warning,
848
848
  text: ( new MarkdownString(( localize(
849
- 10818,
849
+ 11120,
850
850
  "This MCP Server is disabled because it is configured to be disabled in the Editor. Please check your [settings]({0}).",
851
851
  settingsCommandLink
852
852
  ))))