@codingame/monaco-vscode-mcp-service-override 32.0.1 → 33.0.7
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.
- package/package.json +2 -2
- package/vscode/src/vs/platform/mcp/common/allowedMcpServersService.js +1 -1
- package/vscode/src/vs/platform/mcp/common/mcpGalleryService.js +22 -8
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcp.contribution.js +3 -3
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpAddContextContribution.js +2 -2
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpCommands.js +61 -61
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpElicitationService.js +25 -25
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpLanguageFeatures.js +22 -22
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpMigration.js +4 -4
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpResourceQuickAccess.js +8 -8
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServerEditor.js +37 -37
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServerEditorInput.js +2 -2
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServerIcons.js +5 -5
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServerWidgets.js +5 -5
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpServersView.js +17 -17
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpWorkbenchService.js +10 -10
- package/vscode/src/vs/workbench/contrib/mcp/common/discovery/extensionMcpDiscovery.js +4 -4
- package/vscode/src/vs/workbench/contrib/mcp/common/discovery/nativeMcpDiscoveryAbstract.js +1 -1
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpContextKeys.js +4 -4
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpLanguageModelToolContribution.js +6 -6
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpRegistry.js +13 -13
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpSamplingLog.js +1 -1
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpSamplingService.js +11 -11
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpSandboxService.js +3 -3
- package/vscode/src/vs/workbench/contrib/mcp/common/mcpServerConnection.js +3 -3
- package/vscode/src/vs/workbench/services/authentication/browser/authenticationMcpService.js +9 -9
|
@@ -192,7 +192,7 @@ let McpServerEditor = class McpServerEditor extends EditorPane {
|
|
|
192
192
|
tabIndex: 0
|
|
193
193
|
}));
|
|
194
194
|
this._register(
|
|
195
|
-
this.hoverService.setupManagedHover(getDefaultHoverDelegate("mouse"), name, ( localize(
|
|
195
|
+
this.hoverService.setupManagedHover(getDefaultHoverDelegate("mouse"), name, ( localize(11205, "Extension name")))
|
|
196
196
|
);
|
|
197
197
|
const subtitle = append(details, $(".subtitle"));
|
|
198
198
|
const subTitleEntryContainers = [];
|
|
@@ -352,18 +352,18 @@ let McpServerEditor = class McpServerEditor extends EditorPane {
|
|
|
352
352
|
this.currentIdentifier = extension.id;
|
|
353
353
|
}
|
|
354
354
|
if (extension.readmeUrl || extension.gallery?.readme) {
|
|
355
|
-
template.navbar.push(McpServerEditorTab.Readme, ( localize(
|
|
355
|
+
template.navbar.push(McpServerEditorTab.Readme, ( localize(11206, "Details")), ( localize(11207, "Extension details, rendered from the extension's 'README.md' file")));
|
|
356
356
|
}
|
|
357
357
|
if (extension.gallery || extension.local?.manifest) {
|
|
358
|
-
template.navbar.push(McpServerEditorTab.Manifest, ( localize(
|
|
358
|
+
template.navbar.push(McpServerEditorTab.Manifest, ( localize(11208, "Manifest")), ( localize(11209, "Server manifest details")));
|
|
359
359
|
}
|
|
360
360
|
if (extension.config) {
|
|
361
|
-
template.navbar.push(McpServerEditorTab.Configuration, ( localize(
|
|
361
|
+
template.navbar.push(McpServerEditorTab.Configuration, ( localize(11210, "Configuration")), ( localize(11211, "Server configuration details")));
|
|
362
362
|
}
|
|
363
363
|
this.transientDisposables.add(this.mcpWorkbenchService.onChange(e => {
|
|
364
364
|
if (e === extension) {
|
|
365
365
|
if (e.config && !( template.navbar.has(McpServerEditorTab.Configuration))) {
|
|
366
|
-
template.navbar.push(McpServerEditorTab.Configuration, ( localize(
|
|
366
|
+
template.navbar.push(McpServerEditorTab.Configuration, ( localize(11210, "Configuration")), ( localize(11211, "Server configuration details")), extension.readmeUrl ? 1 : 0);
|
|
367
367
|
}
|
|
368
368
|
if (!e.config && ( template.navbar.has(McpServerEditorTab.Configuration))) {
|
|
369
369
|
template.navbar.remove(McpServerEditorTab.Configuration);
|
|
@@ -591,7 +591,7 @@ let McpServerEditor = class McpServerEditor extends EditorPane {
|
|
|
591
591
|
this.contentDisposables.add(toDisposable(insert(this.layoutParticipants, {
|
|
592
592
|
layout
|
|
593
593
|
})));
|
|
594
|
-
const activeElement = await this.openMarkdown(extension, this.mcpServerReadme.get(), ( localize(
|
|
594
|
+
const activeElement = await this.openMarkdown(extension, this.mcpServerReadme.get(), ( localize(11212, "No README available.")), readmeContainer, WebviewIndex.Readme, ( localize(11213, "Readme")), token);
|
|
595
595
|
this.renderAdditionalDetails(additionalDetailsContainer, extension);
|
|
596
596
|
return activeElement;
|
|
597
597
|
}
|
|
@@ -640,7 +640,7 @@ let McpServerEditor = class McpServerEditor extends EditorPane {
|
|
|
640
640
|
content.removeChild(content.firstChild);
|
|
641
641
|
}
|
|
642
642
|
const noManifestMessage = append(content, $(".no-manifest"));
|
|
643
|
-
noManifestMessage.textContent = ( localize(
|
|
643
|
+
noManifestMessage.textContent = ( localize(11214, "No manifest available for this MCP server."));
|
|
644
644
|
}
|
|
645
645
|
const scrollableContent = ( new DomScrollableElement(content, {}));
|
|
646
646
|
const layout = () => scrollableContent.scanDomNode();
|
|
@@ -657,36 +657,36 @@ let McpServerEditor = class McpServerEditor extends EditorPane {
|
|
|
657
657
|
const config = mcpServer.config;
|
|
658
658
|
if (!config) {
|
|
659
659
|
const noConfigMessage = append(container, $(".no-config"));
|
|
660
|
-
noConfigMessage.textContent = ( localize(
|
|
660
|
+
noConfigMessage.textContent = ( localize(11215, "No configuration available for this MCP server."));
|
|
661
661
|
return;
|
|
662
662
|
}
|
|
663
663
|
const nameSection = append(container, $(".config-section"));
|
|
664
664
|
const nameLabel = append(nameSection, $(".config-label"));
|
|
665
|
-
nameLabel.textContent = ( localize(
|
|
665
|
+
nameLabel.textContent = ( localize(11216, "Name:"));
|
|
666
666
|
const nameValue = append(nameSection, $(".config-value"));
|
|
667
667
|
nameValue.textContent = mcpServer.name;
|
|
668
668
|
const typeSection = append(container, $(".config-section"));
|
|
669
669
|
const typeLabel = append(typeSection, $(".config-label"));
|
|
670
|
-
typeLabel.textContent = ( localize(
|
|
670
|
+
typeLabel.textContent = ( localize(11217, "Type:"));
|
|
671
671
|
const typeValue = append(typeSection, $(".config-value"));
|
|
672
672
|
typeValue.textContent = config.type;
|
|
673
673
|
if (config.type === McpServerType.LOCAL) {
|
|
674
674
|
const commandSection = append(container, $(".config-section"));
|
|
675
675
|
const commandLabel = append(commandSection, $(".config-label"));
|
|
676
|
-
commandLabel.textContent = ( localize(
|
|
676
|
+
commandLabel.textContent = ( localize(11218, "Command:"));
|
|
677
677
|
const commandValue = append(commandSection, $("code.config-value"));
|
|
678
678
|
commandValue.textContent = config.command;
|
|
679
679
|
if (config.args && config.args.length > 0) {
|
|
680
680
|
const argsSection = append(container, $(".config-section"));
|
|
681
681
|
const argsLabel = append(argsSection, $(".config-label"));
|
|
682
|
-
argsLabel.textContent = ( localize(
|
|
682
|
+
argsLabel.textContent = ( localize(11219, "Arguments:"));
|
|
683
683
|
const argsValue = append(argsSection, $("code.config-value"));
|
|
684
684
|
argsValue.textContent = config.args.join(" ");
|
|
685
685
|
}
|
|
686
686
|
if (config.env && ( Object.keys(config.env)).length > 0) {
|
|
687
687
|
const envSection = append(container, $(".config-section"));
|
|
688
688
|
const envLabel = append(envSection, $(".config-label"));
|
|
689
|
-
envLabel.textContent = ( localize(
|
|
689
|
+
envLabel.textContent = ( localize(11220, "Environment:"));
|
|
690
690
|
const envValue = append(envSection, $(".config-value"));
|
|
691
691
|
for (const [key, value] of Object.entries(config.env)) {
|
|
692
692
|
append(envValue, $("code.env-entry", undefined, `${key}=${value ?? ""}`));
|
|
@@ -695,20 +695,20 @@ let McpServerEditor = class McpServerEditor extends EditorPane {
|
|
|
695
695
|
if (config.envFile) {
|
|
696
696
|
const envFileSection = append(container, $(".config-section"));
|
|
697
697
|
const envFileLabel = append(envFileSection, $(".config-label"));
|
|
698
|
-
envFileLabel.textContent = ( localize(
|
|
698
|
+
envFileLabel.textContent = ( localize(11221, "Environment File:"));
|
|
699
699
|
const envFileValue = append(envFileSection, $("code.config-value"));
|
|
700
700
|
envFileValue.textContent = config.envFile;
|
|
701
701
|
}
|
|
702
702
|
} else if (config.type === McpServerType.REMOTE) {
|
|
703
703
|
const urlSection = append(container, $(".config-section"));
|
|
704
704
|
const urlLabel = append(urlSection, $(".config-label"));
|
|
705
|
-
urlLabel.textContent = ( localize(
|
|
705
|
+
urlLabel.textContent = ( localize(11222, "URL:"));
|
|
706
706
|
const urlValue = append(urlSection, $("code.config-value"));
|
|
707
707
|
urlValue.textContent = config.url;
|
|
708
708
|
if (config.headers && ( Object.keys(config.headers)).length > 0) {
|
|
709
709
|
const headersSection = append(container, $(".config-section"));
|
|
710
710
|
const headersLabel = append(headersSection, $(".config-label"));
|
|
711
|
-
headersLabel.textContent = ( localize(
|
|
711
|
+
headersLabel.textContent = ( localize(11223, "Headers:"));
|
|
712
712
|
const headersValue = append(headersSection, $(".config-value"));
|
|
713
713
|
for (const [key, value] of Object.entries(config.headers)) {
|
|
714
714
|
append(headersValue, $("code.env-entry", undefined, `${key}: ${value ?? ""}`));
|
|
@@ -731,7 +731,7 @@ let McpServerEditor = class McpServerEditor extends EditorPane {
|
|
|
731
731
|
append(container, $(
|
|
732
732
|
".manifest-section",
|
|
733
733
|
undefined,
|
|
734
|
-
$(".manifest-section-title", undefined, ( localize(
|
|
734
|
+
$(".manifest-section-title", undefined, ( localize(11224, "Packages")))
|
|
735
735
|
));
|
|
736
736
|
for (const [packageType, packages] of packagesByType) {
|
|
737
737
|
const packageSection = append(container, $(
|
|
@@ -744,7 +744,7 @@ let McpServerEditor = class McpServerEditor extends EditorPane {
|
|
|
744
744
|
const pkg = packages[i];
|
|
745
745
|
append(
|
|
746
746
|
packagesGrid,
|
|
747
|
-
$(".package-detail", undefined, $(".detail-label", undefined, ( localize(
|
|
747
|
+
$(".package-detail", undefined, $(".detail-label", undefined, ( localize(11225, "Package:"))), $(".detail-value", undefined, pkg.identifier))
|
|
748
748
|
);
|
|
749
749
|
if (pkg.packageArguments && pkg.packageArguments.length > 0) {
|
|
750
750
|
const argStrings = [];
|
|
@@ -764,7 +764,7 @@ let McpServerEditor = class McpServerEditor extends EditorPane {
|
|
|
764
764
|
}
|
|
765
765
|
append(
|
|
766
766
|
packagesGrid,
|
|
767
|
-
$(".package-detail", undefined, $(".detail-label", undefined, ( localize(
|
|
767
|
+
$(".package-detail", undefined, $(".detail-label", undefined, ( localize(11226, "Package Arguments:"))), $("code.detail-value", undefined, argStrings.join(" ")))
|
|
768
768
|
);
|
|
769
769
|
}
|
|
770
770
|
if (pkg.runtimeArguments && pkg.runtimeArguments.length > 0) {
|
|
@@ -785,14 +785,14 @@ let McpServerEditor = class McpServerEditor extends EditorPane {
|
|
|
785
785
|
}
|
|
786
786
|
append(
|
|
787
787
|
packagesGrid,
|
|
788
|
-
$(".package-detail", undefined, $(".detail-label", undefined, ( localize(
|
|
788
|
+
$(".package-detail", undefined, $(".detail-label", undefined, ( localize(11227, "Runtime Arguments:"))), $("code.detail-value", undefined, argStrings.join(" ")))
|
|
789
789
|
);
|
|
790
790
|
}
|
|
791
791
|
if (pkg.environmentVariables && pkg.environmentVariables.length > 0) {
|
|
792
792
|
const envStrings = ( pkg.environmentVariables.map(envVar => `${envVar.name}=${envVar.value ?? ""}`));
|
|
793
793
|
append(
|
|
794
794
|
packagesGrid,
|
|
795
|
-
$(".package-detail", undefined, $(".detail-label", undefined, ( localize(
|
|
795
|
+
$(".package-detail", undefined, $(".detail-label", undefined, ( localize(11228, "Environment Variables:"))), $("code.detail-value", undefined, envStrings.join(" ")))
|
|
796
796
|
);
|
|
797
797
|
}
|
|
798
798
|
if (i < packages.length - 1) {
|
|
@@ -805,25 +805,25 @@ let McpServerEditor = class McpServerEditor extends EditorPane {
|
|
|
805
805
|
const packageSection = append(container, $(
|
|
806
806
|
".package-section",
|
|
807
807
|
undefined,
|
|
808
|
-
$(".package-section-title", undefined, ( localize(
|
|
808
|
+
$(".package-section-title", undefined, ( localize(11229, "Remote")).toLocaleUpperCase())
|
|
809
809
|
));
|
|
810
810
|
for (const remote of manifest.remotes) {
|
|
811
811
|
const packagesGrid = append(packageSection, $(".package-details"));
|
|
812
812
|
append(
|
|
813
813
|
packagesGrid,
|
|
814
|
-
$(".package-detail", undefined, $(".detail-label", undefined, ( localize(
|
|
814
|
+
$(".package-detail", undefined, $(".detail-label", undefined, ( localize(11222, "URL:"))), $(".detail-value", undefined, remote.url))
|
|
815
815
|
);
|
|
816
816
|
if (remote.type) {
|
|
817
817
|
append(
|
|
818
818
|
packagesGrid,
|
|
819
|
-
$(".package-detail", undefined, $(".detail-label", undefined, ( localize(
|
|
819
|
+
$(".package-detail", undefined, $(".detail-label", undefined, ( localize(11230, "Transport:"))), $(".detail-value", undefined, remote.type))
|
|
820
820
|
);
|
|
821
821
|
}
|
|
822
822
|
if (remote.headers && remote.headers.length > 0) {
|
|
823
823
|
const headerStrings = ( remote.headers.map(header => `${header.name}: ${header.value ?? ""}`));
|
|
824
824
|
append(
|
|
825
825
|
packagesGrid,
|
|
826
|
-
$(".package-detail", undefined, $(".detail-label", undefined, ( localize(
|
|
826
|
+
$(".package-detail", undefined, $(".detail-label", undefined, ( localize(11223, "Headers:"))), $(".detail-value", undefined, headerStrings.join(", ")))
|
|
827
827
|
);
|
|
828
828
|
}
|
|
829
829
|
}
|
|
@@ -902,7 +902,7 @@ let AdditionalDetailsWidget = class AdditionalDetailsWidget extends Disposable {
|
|
|
902
902
|
const categoriesContainer = append(container, $(".categories-container.additional-details-element"));
|
|
903
903
|
append(
|
|
904
904
|
categoriesContainer,
|
|
905
|
-
$(".additional-details-title", undefined, ( localize(
|
|
905
|
+
$(".additional-details-title", undefined, ( localize(11231, "Tags")))
|
|
906
906
|
);
|
|
907
907
|
const categoriesElement = append(categoriesContainer, $(".categories"));
|
|
908
908
|
for (const category of extension.gallery.topics) {
|
|
@@ -917,14 +917,14 @@ let AdditionalDetailsWidget = class AdditionalDetailsWidget extends Disposable {
|
|
|
917
917
|
const manifest = await this.mcpGalleryManifestService.getMcpGalleryManifest();
|
|
918
918
|
if (extension.repository) {
|
|
919
919
|
try {
|
|
920
|
-
resources.push([( localize(
|
|
920
|
+
resources.push([( localize(11232, "Repository")), ThemeIcon.fromId(Codicon.repo.id), ( URI.parse(extension.repository))]);
|
|
921
921
|
} catch (error) {}
|
|
922
922
|
}
|
|
923
923
|
if (manifest) {
|
|
924
924
|
const supportUri = getMcpGalleryManifestResourceUri(manifest, McpGalleryResourceType.ContactSupportUri);
|
|
925
925
|
if (supportUri) {
|
|
926
926
|
try {
|
|
927
|
-
resources.push([( localize(
|
|
927
|
+
resources.push([( localize(11233, "Contact Support")), ThemeIcon.fromId(Codicon.commentDiscussion.id), ( URI.parse(supportUri))]);
|
|
928
928
|
} catch (error) {}
|
|
929
929
|
}
|
|
930
930
|
}
|
|
@@ -932,7 +932,7 @@ let AdditionalDetailsWidget = class AdditionalDetailsWidget extends Disposable {
|
|
|
932
932
|
const extensionResourcesContainer = append(container, $(".resources-container.additional-details-element"));
|
|
933
933
|
append(
|
|
934
934
|
extensionResourcesContainer,
|
|
935
|
-
$(".additional-details-title", undefined, ( localize(
|
|
935
|
+
$(".additional-details-title", undefined, ( localize(11234, "Resources")))
|
|
936
936
|
);
|
|
937
937
|
const resourcesElement = append(extensionResourcesContainer, $(".resources"));
|
|
938
938
|
for (const [label, icon, uri] of resources) {
|
|
@@ -952,20 +952,20 @@ let AdditionalDetailsWidget = class AdditionalDetailsWidget extends Disposable {
|
|
|
952
952
|
const installInfoContainer = append(container, $(".more-info-container.additional-details-element"));
|
|
953
953
|
append(
|
|
954
954
|
installInfoContainer,
|
|
955
|
-
$(".additional-details-title", undefined, ( localize(
|
|
955
|
+
$(".additional-details-title", undefined, ( localize(11235, "Installation")))
|
|
956
956
|
);
|
|
957
957
|
const installInfo = append(installInfoContainer, $(".more-info"));
|
|
958
958
|
append(installInfo, $(
|
|
959
959
|
".more-info-entry",
|
|
960
960
|
undefined,
|
|
961
|
-
$("div.more-info-entry-name", undefined, ( localize(
|
|
961
|
+
$("div.more-info-entry-name", undefined, ( localize(11236, "Identifier"))),
|
|
962
962
|
$("code", undefined, extension.name)
|
|
963
963
|
));
|
|
964
964
|
if (extension.version) {
|
|
965
965
|
append(installInfo, $(
|
|
966
966
|
".more-info-entry",
|
|
967
967
|
undefined,
|
|
968
|
-
$("div.more-info-entry-name", undefined, ( localize(
|
|
968
|
+
$("div.more-info-entry-name", undefined, ( localize(11237, "Version"))),
|
|
969
969
|
$("code", undefined, extension.version)
|
|
970
970
|
));
|
|
971
971
|
}
|
|
@@ -975,7 +975,7 @@ let AdditionalDetailsWidget = class AdditionalDetailsWidget extends Disposable {
|
|
|
975
975
|
const moreInfoContainer = append(container, $(".more-info-container.additional-details-element"));
|
|
976
976
|
append(
|
|
977
977
|
moreInfoContainer,
|
|
978
|
-
$(".additional-details-title", undefined, ( localize(
|
|
978
|
+
$(".additional-details-title", undefined, ( localize(11238, "Marketplace")))
|
|
979
979
|
);
|
|
980
980
|
const moreInfo = append(moreInfoContainer, $(".more-info"));
|
|
981
981
|
if (gallery) {
|
|
@@ -983,14 +983,14 @@ let AdditionalDetailsWidget = class AdditionalDetailsWidget extends Disposable {
|
|
|
983
983
|
append(moreInfo, $(
|
|
984
984
|
".more-info-entry",
|
|
985
985
|
undefined,
|
|
986
|
-
$("div.more-info-entry-name", undefined, ( localize(
|
|
986
|
+
$("div.more-info-entry-name", undefined, ( localize(11236, "Identifier"))),
|
|
987
987
|
$("code", undefined, extension.name)
|
|
988
988
|
));
|
|
989
989
|
if (gallery.version) {
|
|
990
990
|
append(moreInfo, $(
|
|
991
991
|
".more-info-entry",
|
|
992
992
|
undefined,
|
|
993
|
-
$("div.more-info-entry-name", undefined, ( localize(
|
|
993
|
+
$("div.more-info-entry-name", undefined, ( localize(11237, "Version"))),
|
|
994
994
|
$("code", undefined, gallery.version)
|
|
995
995
|
));
|
|
996
996
|
}
|
|
@@ -999,7 +999,7 @@ let AdditionalDetailsWidget = class AdditionalDetailsWidget extends Disposable {
|
|
|
999
999
|
append(moreInfo, $(
|
|
1000
1000
|
".more-info-entry",
|
|
1001
1001
|
undefined,
|
|
1002
|
-
$("div.more-info-entry-name", undefined, ( localize(
|
|
1002
|
+
$("div.more-info-entry-name", undefined, ( localize(11239, "Last Released"))),
|
|
1003
1003
|
$("div", {
|
|
1004
1004
|
"title": ( ( new Date(gallery.lastUpdated)).toString())
|
|
1005
1005
|
}, fromNow(gallery.lastUpdated, true, true, true))
|
|
@@ -1009,7 +1009,7 @@ let AdditionalDetailsWidget = class AdditionalDetailsWidget extends Disposable {
|
|
|
1009
1009
|
append(moreInfo, $(
|
|
1010
1010
|
".more-info-entry",
|
|
1011
1011
|
undefined,
|
|
1012
|
-
$("div.more-info-entry-name", undefined, ( localize(
|
|
1012
|
+
$("div.more-info-entry-name", undefined, ( localize(11240, "Published"))),
|
|
1013
1013
|
$("div", {
|
|
1014
1014
|
"title": ( ( new Date(gallery.publishDate)).toString())
|
|
1015
1015
|
}, fromNow(gallery.publishDate, true, true, true))
|
|
@@ -8,7 +8,7 @@ import { join } from '@codingame/monaco-vscode-api/vscode/vs/base/common/path';
|
|
|
8
8
|
import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
|
|
9
9
|
import { registerIcon } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/iconRegistry';
|
|
10
10
|
|
|
11
|
-
const MCPServerEditorIcon = registerIcon("mcp-server-editor-icon", Codicon.mcp, ( localize(
|
|
11
|
+
const MCPServerEditorIcon = registerIcon("mcp-server-editor-icon", Codicon.mcp, ( localize(11241, "Icon of the MCP Server editor.")));
|
|
12
12
|
class McpServerEditorInput extends EditorInput {
|
|
13
13
|
static {
|
|
14
14
|
this.ID = "workbench.mcpServer.input2";
|
|
@@ -33,7 +33,7 @@ class McpServerEditorInput extends EditorInput {
|
|
|
33
33
|
return this._mcpServer;
|
|
34
34
|
}
|
|
35
35
|
getName() {
|
|
36
|
-
return localize(
|
|
36
|
+
return localize(11242, "MCP Server: {0}", this._mcpServer.label);
|
|
37
37
|
}
|
|
38
38
|
getIcon() {
|
|
39
39
|
return MCPServerEditorIcon;
|
|
@@ -3,10 +3,10 @@ import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codi
|
|
|
3
3
|
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
4
4
|
import { registerIcon } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/iconRegistry';
|
|
5
5
|
|
|
6
|
-
const mcpServerIcon = registerIcon("mcp-server", Codicon.mcp, ( localize(
|
|
7
|
-
const mcpServerRemoteIcon = registerIcon("mcp-server-remote", Codicon.remote, ( localize(
|
|
8
|
-
const mcpServerWorkspaceIcon = registerIcon("mcp-server-workspace", Codicon.rootFolder, ( localize(
|
|
9
|
-
const mcpStarredIcon = registerIcon("mcp-server-starred", Codicon.starFull, ( localize(
|
|
10
|
-
const mcpLicenseIcon = registerIcon("mcp-server-license", Codicon.law, ( localize(
|
|
6
|
+
const mcpServerIcon = registerIcon("mcp-server", Codicon.mcp, ( localize(11243, "Icon used for the MCP server.")));
|
|
7
|
+
const mcpServerRemoteIcon = registerIcon("mcp-server-remote", Codicon.remote, ( localize(11244, "Icon to indicate that an MCP server is for the remote user scope.")));
|
|
8
|
+
const mcpServerWorkspaceIcon = registerIcon("mcp-server-workspace", Codicon.rootFolder, ( localize(11245, "Icon to indicate that an MCP server is for the workspace scope.")));
|
|
9
|
+
const mcpStarredIcon = registerIcon("mcp-server-starred", Codicon.starFull, ( localize(11246, "Icon shown along with the starred status.")));
|
|
10
|
+
const mcpLicenseIcon = registerIcon("mcp-server-license", Codicon.law, ( localize(11247, "Icon shown along with the license status.")));
|
|
11
11
|
|
|
12
12
|
export { mcpLicenseIcon, mcpServerIcon, mcpServerRemoteIcon, mcpServerWorkspaceIcon, mcpStarredIcon };
|
|
@@ -167,7 +167,7 @@ let PublisherWidget = class PublisherWidget extends McpServerWidget {
|
|
|
167
167
|
this.element.setAttribute("role", "button");
|
|
168
168
|
this.element.tabIndex = 0;
|
|
169
169
|
this.containerHover = this.disposables.add(
|
|
170
|
-
this.hoverService.setupManagedHover(getDefaultHoverDelegate("mouse"), this.element, ( localize(
|
|
170
|
+
this.hoverService.setupManagedHover(getDefaultHoverDelegate("mouse"), this.element, ( localize(11248, "Publisher ({0})", this.mcpServer.publisherDisplayName)))
|
|
171
171
|
);
|
|
172
172
|
append(this.element, publisherDisplayName);
|
|
173
173
|
if (this.mcpServer.gallery?.publisherDomain?.verified) {
|
|
@@ -176,7 +176,7 @@ let PublisherWidget = class PublisherWidget extends McpServerWidget {
|
|
|
176
176
|
verifiedPublisher.tabIndex = 0;
|
|
177
177
|
verifiedPublisher.setAttribute("role", "button");
|
|
178
178
|
this.containerHover.update(( localize(
|
|
179
|
-
|
|
179
|
+
11249,
|
|
180
180
|
"This publisher has verified ownership of {0}",
|
|
181
181
|
this.mcpServer.gallery?.publisherDomain.link
|
|
182
182
|
)));
|
|
@@ -325,12 +325,12 @@ let McpServerHoverWidget = class McpServerHoverWidget extends McpServerWidget {
|
|
|
325
325
|
let addSeparator = false;
|
|
326
326
|
if (this.mcpServer.local?.scope === LocalMcpServerScope.Workspace) {
|
|
327
327
|
markdown.appendMarkdown(`$(${mcpServerWorkspaceIcon.id}) `);
|
|
328
|
-
markdown.appendMarkdown(( localize(
|
|
328
|
+
markdown.appendMarkdown(( localize(11250, "Workspace MCP Server")));
|
|
329
329
|
addSeparator = true;
|
|
330
330
|
}
|
|
331
331
|
if (this.mcpServer.local?.scope === LocalMcpServerScope.RemoteUser) {
|
|
332
332
|
markdown.appendMarkdown(`$(${mcpServerRemoteIcon.id}) `);
|
|
333
|
-
markdown.appendMarkdown(( localize(
|
|
333
|
+
markdown.appendMarkdown(( localize(11251, "Remote MCP Server")));
|
|
334
334
|
addSeparator = true;
|
|
335
335
|
}
|
|
336
336
|
if (this.mcpServer.installState === McpServerInstallState.Installed) {
|
|
@@ -448,7 +448,7 @@ const mcpStarredIconColor = registerColor("mcpIcon.starForeground", {
|
|
|
448
448
|
dark: "#FF8E00",
|
|
449
449
|
hcDark: "#FF8E00",
|
|
450
450
|
hcLight: textLinkForeground
|
|
451
|
-
}, ( localize(
|
|
451
|
+
}, ( localize(11252, "The icon color for mcp starred.")), false);
|
|
452
452
|
registerThemingParticipant((theme, collector) => {
|
|
453
453
|
const mcpStarredIconColorValue = theme.getColor(mcpStarredIconColor);
|
|
454
454
|
if (mcpStarredIconColorValue) {
|
|
@@ -142,7 +142,7 @@ let McpServersListView = class McpServersListView extends AbstractExtensionsList
|
|
|
142
142
|
return mcpServer?.label ?? "";
|
|
143
143
|
},
|
|
144
144
|
getWidgetAriaLabel() {
|
|
145
|
-
return localize(
|
|
145
|
+
return localize(11253, "MCP Servers");
|
|
146
146
|
}
|
|
147
147
|
},
|
|
148
148
|
overrideStyles: getLocationBasedViewColors(this.viewDescriptorService.getViewLocationById(this.id)).listOverrideStyles,
|
|
@@ -251,43 +251,43 @@ let McpServersListView = class McpServersListView extends AbstractExtensionsList
|
|
|
251
251
|
const iconElement = append(iconContainer, $("span"));
|
|
252
252
|
iconElement.className = ThemeIcon.asClassName(mcpServerIcon);
|
|
253
253
|
const title = append(welcomeContent, $(".mcp-welcome-title"));
|
|
254
|
-
title.textContent = ( localize(
|
|
254
|
+
title.textContent = ( localize(11254, "MCP Servers"));
|
|
255
255
|
const settingsCommandLink = ( createMarkdownCommandLink({
|
|
256
256
|
id: "workbench.action.openSettings",
|
|
257
257
|
arguments: [`@id:${mcpGalleryServiceEnablementConfig}`],
|
|
258
258
|
text: mcpGalleryServiceEnablementConfig,
|
|
259
|
-
tooltip: ( localize(
|
|
259
|
+
tooltip: ( localize(11255, "Open Settings"))
|
|
260
260
|
}).toString());
|
|
261
261
|
const description = append(welcomeContent, $(".mcp-welcome-description"));
|
|
262
262
|
const markdownResult = this._register(this.markdownRendererService.render(( new MarkdownString(( localize(
|
|
263
|
-
|
|
263
|
+
11256,
|
|
264
264
|
"Browse and install [Model Context Protocol (MCP) servers](https://code.visualstudio.com/docs/copilot/customization/mcp-servers) directly from VS Code to extend agent mode with extra tools for connecting to databases, invoking APIs and performing specialized tasks."
|
|
265
265
|
)), {
|
|
266
266
|
isTrusted: {
|
|
267
267
|
enabledCommands: ["workbench.action.openSettings"]
|
|
268
268
|
}
|
|
269
269
|
})).appendMarkdown("\n\n").appendMarkdown(( localize(
|
|
270
|
-
|
|
270
|
+
11257,
|
|
271
271
|
"This feature is currently in preview. You can disable it anytime using the setting {0}.",
|
|
272
272
|
settingsCommandLink
|
|
273
273
|
)))));
|
|
274
274
|
description.appendChild(markdownResult.element);
|
|
275
275
|
const buttonContainer = append(welcomeContent, $(".mcp-welcome-button-container"));
|
|
276
276
|
const button = this._register(( new Button(buttonContainer, {
|
|
277
|
-
title: ( localize(
|
|
277
|
+
title: ( localize(11258, "Enable MCP Servers Marketplace")),
|
|
278
278
|
...defaultButtonStyles
|
|
279
279
|
})));
|
|
280
|
-
button.label = ( localize(
|
|
280
|
+
button.label = ( localize(11258, "Enable MCP Servers Marketplace"));
|
|
281
281
|
this._register(button.onDidClick(async () => {
|
|
282
282
|
const {
|
|
283
283
|
result
|
|
284
284
|
} = await this.dialogService.prompt({
|
|
285
285
|
type: "info",
|
|
286
|
-
message: ( localize(
|
|
286
|
+
message: ( localize(11259, "Enable MCP Servers Marketplace?")),
|
|
287
287
|
custom: {
|
|
288
288
|
markdownDetails: [{
|
|
289
289
|
markdown: ( new MarkdownString(( localize(
|
|
290
|
-
|
|
290
|
+
11257,
|
|
291
291
|
"This feature is currently in preview. You can disable it anytime using the setting {0}.",
|
|
292
292
|
settingsCommandLink
|
|
293
293
|
)), {
|
|
@@ -296,10 +296,10 @@ let McpServersListView = class McpServersListView extends AbstractExtensionsList
|
|
|
296
296
|
}]
|
|
297
297
|
},
|
|
298
298
|
buttons: [{
|
|
299
|
-
label: ( localize(
|
|
299
|
+
label: ( localize(11260, "Enable")),
|
|
300
300
|
run: () => true
|
|
301
301
|
}, {
|
|
302
|
-
label: ( localize(
|
|
302
|
+
label: ( localize(11261, "Cancel")),
|
|
303
303
|
run: () => false
|
|
304
304
|
}]
|
|
305
305
|
});
|
|
@@ -319,7 +319,7 @@ let McpServersListView = class McpServersListView extends AbstractExtensionsList
|
|
|
319
319
|
this.bodyTemplate.messageBox.textContent = message.text;
|
|
320
320
|
} else if (count === 0) {
|
|
321
321
|
this.bodyTemplate.messageSeverityIcon.className = "";
|
|
322
|
-
this.bodyTemplate.messageBox.textContent = ( localize(
|
|
322
|
+
this.bodyTemplate.messageBox.textContent = ( localize(11262, "No MCP Servers found."));
|
|
323
323
|
}
|
|
324
324
|
if (this.bodyTemplate.messageBox.textContent) {
|
|
325
325
|
alert(this.bodyTemplate.messageBox.textContent);
|
|
@@ -533,7 +533,7 @@ class McpServersViewsContribution extends Disposable {
|
|
|
533
533
|
super();
|
|
534
534
|
( Registry.as(Extensions.ViewsRegistry)).registerViews([{
|
|
535
535
|
id: InstalledMcpServersViewId,
|
|
536
|
-
name: ( localize2(
|
|
536
|
+
name: ( localize2(11263, "MCP Servers - Installed")),
|
|
537
537
|
ctorDescriptor: ( new SyncDescriptor(McpServersListView, [{}])),
|
|
538
538
|
when: ( ContextKeyExpr.and(DefaultViewsContext, HasInstalledMcpServersContext, ( ChatContextKeys.Setup.hidden.negate()), ( ChatContextKeys.Setup.disabledInWorkspace.negate()))),
|
|
539
539
|
weight: 40,
|
|
@@ -541,7 +541,7 @@ class McpServersViewsContribution extends Disposable {
|
|
|
541
541
|
canToggleVisibility: true
|
|
542
542
|
}, {
|
|
543
543
|
id: "workbench.views.mcp.default.marketplace",
|
|
544
|
-
name: ( localize2(
|
|
544
|
+
name: ( localize2(11264, "MCP Servers")),
|
|
545
545
|
ctorDescriptor: ( new SyncDescriptor(DefaultBrowseMcpServersView, [{}])),
|
|
546
546
|
when: ( ContextKeyExpr.and(DefaultViewsContext, ( HasInstalledMcpServersContext.toNegated()), ( ChatContextKeys.Setup.hidden.negate()), ( ChatContextKeys.Setup.disabledInWorkspace.negate()), ( McpServersGalleryStatusContext.isEqualTo(McpGalleryManifestStatus.Available)), ( ContextKeyExpr.or(( ContextKeyDefinedExpr.create(`config.${mcpGalleryServiceUrlConfig}`)), ( ProductQualityContext.notEqualsTo("stable")), ( ContextKeyDefinedExpr.create(`config.${mcpGalleryServiceEnablementConfig}`)))))),
|
|
547
547
|
weight: 40,
|
|
@@ -549,12 +549,12 @@ class McpServersViewsContribution extends Disposable {
|
|
|
549
549
|
canToggleVisibility: true
|
|
550
550
|
}, {
|
|
551
551
|
id: "workbench.views.mcp.marketplace",
|
|
552
|
-
name: ( localize2(
|
|
552
|
+
name: ( localize2(11264, "MCP Servers")),
|
|
553
553
|
ctorDescriptor: ( new SyncDescriptor(McpServersListView, [{}])),
|
|
554
554
|
when: ( ContextKeyExpr.and(SearchMcpServersContext, ( ChatContextKeys.Setup.hidden.negate()), ( ChatContextKeys.Setup.disabledInWorkspace.negate()), ( McpServersGalleryStatusContext.isEqualTo(McpGalleryManifestStatus.Available)), ( ContextKeyExpr.or(( ContextKeyDefinedExpr.create(`config.${mcpGalleryServiceUrlConfig}`)), ( ProductQualityContext.notEqualsTo("stable")), ( ContextKeyDefinedExpr.create(`config.${mcpGalleryServiceEnablementConfig}`))))))
|
|
555
555
|
}, {
|
|
556
556
|
id: "workbench.views.mcp.default.welcomeView",
|
|
557
|
-
name: ( localize2(
|
|
557
|
+
name: ( localize2(11264, "MCP Servers")),
|
|
558
558
|
ctorDescriptor: ( new SyncDescriptor(DefaultBrowseMcpServersView, [{
|
|
559
559
|
showWelcome: true
|
|
560
560
|
}])),
|
|
@@ -564,7 +564,7 @@ class McpServersViewsContribution extends Disposable {
|
|
|
564
564
|
canToggleVisibility: true
|
|
565
565
|
}, {
|
|
566
566
|
id: "workbench.views.mcp.welcomeView",
|
|
567
|
-
name: ( localize2(
|
|
567
|
+
name: ( localize2(11264, "MCP Servers")),
|
|
568
568
|
ctorDescriptor: ( new SyncDescriptor(McpServersListView, [{
|
|
569
569
|
showWelcome: true
|
|
570
570
|
}])),
|
|
@@ -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
|
-
|
|
453
|
+
11265,
|
|
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
|
-
|
|
466
|
+
11265,
|
|
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(
|
|
479
|
+
return ( new MarkdownString()).appendText(( localize(11266, "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
|
-
|
|
496
|
+
11267,
|
|
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(
|
|
603
|
+
label: ( localize(11268, "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(
|
|
792
|
+
text: ( new MarkdownString(( localize(11269, "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(
|
|
801
|
+
text: ( new MarkdownString(( localize(11270, "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
|
-
|
|
821
|
+
11271,
|
|
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
|
-
|
|
835
|
+
11272,
|
|
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
|
-
|
|
849
|
+
11272,
|
|
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
|
))))
|
|
@@ -142,20 +142,20 @@ let ExtensionMcpDiscovery = ExtensionMcpDiscovery_1 = class ExtensionMcpDiscover
|
|
|
142
142
|
}
|
|
143
143
|
static _validate(user) {
|
|
144
144
|
if (!Array.isArray(user.value)) {
|
|
145
|
-
user.collector.error(( localize(
|
|
145
|
+
user.collector.error(( localize(11273, "Expected an array of MCP collections")));
|
|
146
146
|
return false;
|
|
147
147
|
}
|
|
148
148
|
for (const contribution of user.value) {
|
|
149
149
|
if (typeof contribution.id !== "string" || isFalsyOrWhitespace(contribution.id)) {
|
|
150
|
-
user.collector.error(( localize(
|
|
150
|
+
user.collector.error(( localize(11274, "Expected 'id' to be a non-empty string.")));
|
|
151
151
|
return false;
|
|
152
152
|
}
|
|
153
153
|
if (typeof contribution.label !== "string" || isFalsyOrWhitespace(contribution.label)) {
|
|
154
|
-
user.collector.error(( localize(
|
|
154
|
+
user.collector.error(( localize(11275, "Expected 'label' to be a non-empty string.")));
|
|
155
155
|
return false;
|
|
156
156
|
}
|
|
157
157
|
if (contribution.when !== undefined && (typeof contribution.when !== "string" || isFalsyOrWhitespace(contribution.when))) {
|
|
158
|
-
user.collector.error(( localize(
|
|
158
|
+
user.collector.error(( localize(11276, "Expected 'when' to be a non-empty string.")));
|
|
159
159
|
return false;
|
|
160
160
|
}
|
|
161
161
|
}
|
|
@@ -86,7 +86,7 @@ let NativeFilesystemMcpDiscovery = class NativeFilesystemMcpDiscovery extends Fi
|
|
|
86
86
|
this.suffix = "";
|
|
87
87
|
if (remoteAuthority) {
|
|
88
88
|
this.suffix = " " + ( localize(
|
|
89
|
-
|
|
89
|
+
11277,
|
|
90
90
|
" on {0}",
|
|
91
91
|
labelService.getHostLabel(Schemas.vscodeRemote, remoteAuthority)
|
|
92
92
|
));
|