@codingame/monaco-vscode-mcp-service-override 37.4.0 → 37.6.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.
- package/package.json +2 -2
- package/vscode/src/vs/workbench/api/browser/mainThreadMcp.js +13 -13
- 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 +96 -96
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpElicitationService.js +25 -25
- package/vscode/src/vs/workbench/contrib/mcp/browser/mcpLanguageFeatures.js +35 -35
- 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(16250, "Extension name")))
|
|
196
196
|
);
|
|
197
197
|
const subtitle = append(details, $(".subtitle"));
|
|
198
198
|
const subTitleEntryContainers = [];
|
|
@@ -354,18 +354,18 @@ let McpServerEditor = class McpServerEditor extends EditorPane {
|
|
|
354
354
|
this.currentIdentifier = extension.id;
|
|
355
355
|
}
|
|
356
356
|
if (extension.readmeUrl || extension.gallery?.readme) {
|
|
357
|
-
template.navbar.push(McpServerEditorTab.Readme, ( localize(
|
|
357
|
+
template.navbar.push(McpServerEditorTab.Readme, ( localize(16251, "Details")), ( localize(16252, "Extension details, rendered from the extension's 'README.md' file")));
|
|
358
358
|
}
|
|
359
359
|
if (extension.gallery || extension.local?.manifest) {
|
|
360
|
-
template.navbar.push(McpServerEditorTab.Manifest, ( localize(
|
|
360
|
+
template.navbar.push(McpServerEditorTab.Manifest, ( localize(16253, "Manifest")), ( localize(16254, "Server manifest details")));
|
|
361
361
|
}
|
|
362
362
|
if (extension.config) {
|
|
363
|
-
template.navbar.push(McpServerEditorTab.Configuration, ( localize(
|
|
363
|
+
template.navbar.push(McpServerEditorTab.Configuration, ( localize(16255, "Configuration")), ( localize(16256, "Server configuration details")));
|
|
364
364
|
}
|
|
365
365
|
this.transientDisposables.add(this.mcpWorkbenchService.onChange(e => {
|
|
366
366
|
if (e === extension) {
|
|
367
367
|
if (e.config && !( template.navbar.has(McpServerEditorTab.Configuration))) {
|
|
368
|
-
template.navbar.push(McpServerEditorTab.Configuration, ( localize(
|
|
368
|
+
template.navbar.push(McpServerEditorTab.Configuration, ( localize(16255, "Configuration")), ( localize(16256, "Server configuration details")), extension.readmeUrl ? 1 : 0);
|
|
369
369
|
}
|
|
370
370
|
if (!e.config && ( template.navbar.has(McpServerEditorTab.Configuration))) {
|
|
371
371
|
template.navbar.remove(McpServerEditorTab.Configuration);
|
|
@@ -593,7 +593,7 @@ let McpServerEditor = class McpServerEditor extends EditorPane {
|
|
|
593
593
|
this.contentDisposables.add(toDisposable(insert(this.layoutParticipants, {
|
|
594
594
|
layout
|
|
595
595
|
})));
|
|
596
|
-
const activeElement = await this.openMarkdown(extension, this.mcpServerReadme.get(), ( localize(
|
|
596
|
+
const activeElement = await this.openMarkdown(extension, this.mcpServerReadme.get(), ( localize(16257, "No README available.")), readmeContainer, WebviewIndex.Readme, ( localize(16258, "Readme")), token);
|
|
597
597
|
this.renderAdditionalDetails(additionalDetailsContainer, extension);
|
|
598
598
|
return activeElement;
|
|
599
599
|
}
|
|
@@ -642,7 +642,7 @@ let McpServerEditor = class McpServerEditor extends EditorPane {
|
|
|
642
642
|
content.removeChild(content.firstChild);
|
|
643
643
|
}
|
|
644
644
|
const noManifestMessage = append(content, $(".no-manifest"));
|
|
645
|
-
noManifestMessage.textContent = ( localize(
|
|
645
|
+
noManifestMessage.textContent = ( localize(16259, "No manifest available for this MCP server."));
|
|
646
646
|
}
|
|
647
647
|
const scrollableContent = ( new DomScrollableElement(content, {}));
|
|
648
648
|
const layout = () => scrollableContent.scanDomNode();
|
|
@@ -659,36 +659,36 @@ let McpServerEditor = class McpServerEditor extends EditorPane {
|
|
|
659
659
|
const config = mcpServer.config;
|
|
660
660
|
if (!config) {
|
|
661
661
|
const noConfigMessage = append(container, $(".no-config"));
|
|
662
|
-
noConfigMessage.textContent = ( localize(
|
|
662
|
+
noConfigMessage.textContent = ( localize(16260, "No configuration available for this MCP server."));
|
|
663
663
|
return;
|
|
664
664
|
}
|
|
665
665
|
const nameSection = append(container, $(".config-section"));
|
|
666
666
|
const nameLabel = append(nameSection, $(".config-label"));
|
|
667
|
-
nameLabel.textContent = ( localize(
|
|
667
|
+
nameLabel.textContent = ( localize(16261, "Name:"));
|
|
668
668
|
const nameValue = append(nameSection, $(".config-value"));
|
|
669
669
|
nameValue.textContent = mcpServer.name;
|
|
670
670
|
const typeSection = append(container, $(".config-section"));
|
|
671
671
|
const typeLabel = append(typeSection, $(".config-label"));
|
|
672
|
-
typeLabel.textContent = ( localize(
|
|
672
|
+
typeLabel.textContent = ( localize(16262, "Type:"));
|
|
673
673
|
const typeValue = append(typeSection, $(".config-value"));
|
|
674
674
|
typeValue.textContent = config.type;
|
|
675
675
|
if (config.type === McpServerType.LOCAL) {
|
|
676
676
|
const commandSection = append(container, $(".config-section"));
|
|
677
677
|
const commandLabel = append(commandSection, $(".config-label"));
|
|
678
|
-
commandLabel.textContent = ( localize(
|
|
678
|
+
commandLabel.textContent = ( localize(16263, "Command:"));
|
|
679
679
|
const commandValue = append(commandSection, $("code.config-value"));
|
|
680
680
|
commandValue.textContent = config.command;
|
|
681
681
|
if (config.args && config.args.length > 0) {
|
|
682
682
|
const argsSection = append(container, $(".config-section"));
|
|
683
683
|
const argsLabel = append(argsSection, $(".config-label"));
|
|
684
|
-
argsLabel.textContent = ( localize(
|
|
684
|
+
argsLabel.textContent = ( localize(16264, "Arguments:"));
|
|
685
685
|
const argsValue = append(argsSection, $("code.config-value"));
|
|
686
686
|
argsValue.textContent = config.args.join(" ");
|
|
687
687
|
}
|
|
688
688
|
if (config.env && ( Object.keys(config.env)).length > 0) {
|
|
689
689
|
const envSection = append(container, $(".config-section"));
|
|
690
690
|
const envLabel = append(envSection, $(".config-label"));
|
|
691
|
-
envLabel.textContent = ( localize(
|
|
691
|
+
envLabel.textContent = ( localize(16265, "Environment:"));
|
|
692
692
|
const envValue = append(envSection, $(".config-value"));
|
|
693
693
|
for (const [key, value] of Object.entries(config.env)) {
|
|
694
694
|
append(envValue, $("code.env-entry", undefined, `${key}=${value ?? ""}`));
|
|
@@ -697,20 +697,20 @@ let McpServerEditor = class McpServerEditor extends EditorPane {
|
|
|
697
697
|
if (config.envFile) {
|
|
698
698
|
const envFileSection = append(container, $(".config-section"));
|
|
699
699
|
const envFileLabel = append(envFileSection, $(".config-label"));
|
|
700
|
-
envFileLabel.textContent = ( localize(
|
|
700
|
+
envFileLabel.textContent = ( localize(16266, "Environment File:"));
|
|
701
701
|
const envFileValue = append(envFileSection, $("code.config-value"));
|
|
702
702
|
envFileValue.textContent = config.envFile;
|
|
703
703
|
}
|
|
704
704
|
} else if (config.type === McpServerType.REMOTE) {
|
|
705
705
|
const urlSection = append(container, $(".config-section"));
|
|
706
706
|
const urlLabel = append(urlSection, $(".config-label"));
|
|
707
|
-
urlLabel.textContent = ( localize(
|
|
707
|
+
urlLabel.textContent = ( localize(16267, "URL:"));
|
|
708
708
|
const urlValue = append(urlSection, $("code.config-value"));
|
|
709
709
|
urlValue.textContent = config.url;
|
|
710
710
|
if (config.headers && ( Object.keys(config.headers)).length > 0) {
|
|
711
711
|
const headersSection = append(container, $(".config-section"));
|
|
712
712
|
const headersLabel = append(headersSection, $(".config-label"));
|
|
713
|
-
headersLabel.textContent = ( localize(
|
|
713
|
+
headersLabel.textContent = ( localize(16268, "Headers:"));
|
|
714
714
|
const headersValue = append(headersSection, $(".config-value"));
|
|
715
715
|
for (const [key, value] of Object.entries(config.headers)) {
|
|
716
716
|
append(headersValue, $("code.env-entry", undefined, `${key}: ${value ?? ""}`));
|
|
@@ -733,7 +733,7 @@ let McpServerEditor = class McpServerEditor extends EditorPane {
|
|
|
733
733
|
append(container, $(
|
|
734
734
|
".manifest-section",
|
|
735
735
|
undefined,
|
|
736
|
-
$(".manifest-section-title", undefined, ( localize(
|
|
736
|
+
$(".manifest-section-title", undefined, ( localize(16269, "Packages")))
|
|
737
737
|
));
|
|
738
738
|
for (const [packageType, packages] of packagesByType) {
|
|
739
739
|
const packageSection = append(container, $(
|
|
@@ -746,7 +746,7 @@ let McpServerEditor = class McpServerEditor extends EditorPane {
|
|
|
746
746
|
const pkg = packages[i];
|
|
747
747
|
append(
|
|
748
748
|
packagesGrid,
|
|
749
|
-
$(".package-detail", undefined, $(".detail-label", undefined, ( localize(
|
|
749
|
+
$(".package-detail", undefined, $(".detail-label", undefined, ( localize(16270, "Package:"))), $(".detail-value", undefined, pkg.identifier))
|
|
750
750
|
);
|
|
751
751
|
if (pkg.packageArguments && pkg.packageArguments.length > 0) {
|
|
752
752
|
const argStrings = [];
|
|
@@ -766,7 +766,7 @@ let McpServerEditor = class McpServerEditor extends EditorPane {
|
|
|
766
766
|
}
|
|
767
767
|
append(
|
|
768
768
|
packagesGrid,
|
|
769
|
-
$(".package-detail", undefined, $(".detail-label", undefined, ( localize(
|
|
769
|
+
$(".package-detail", undefined, $(".detail-label", undefined, ( localize(16271, "Package Arguments:"))), $("code.detail-value", undefined, argStrings.join(" ")))
|
|
770
770
|
);
|
|
771
771
|
}
|
|
772
772
|
if (pkg.runtimeArguments && pkg.runtimeArguments.length > 0) {
|
|
@@ -787,14 +787,14 @@ let McpServerEditor = class McpServerEditor extends EditorPane {
|
|
|
787
787
|
}
|
|
788
788
|
append(
|
|
789
789
|
packagesGrid,
|
|
790
|
-
$(".package-detail", undefined, $(".detail-label", undefined, ( localize(
|
|
790
|
+
$(".package-detail", undefined, $(".detail-label", undefined, ( localize(16272, "Runtime Arguments:"))), $("code.detail-value", undefined, argStrings.join(" ")))
|
|
791
791
|
);
|
|
792
792
|
}
|
|
793
793
|
if (pkg.environmentVariables && pkg.environmentVariables.length > 0) {
|
|
794
794
|
const envStrings = pkg.environmentVariables.map(envVar => `${envVar.name}=${envVar.value ?? ""}`);
|
|
795
795
|
append(
|
|
796
796
|
packagesGrid,
|
|
797
|
-
$(".package-detail", undefined, $(".detail-label", undefined, ( localize(
|
|
797
|
+
$(".package-detail", undefined, $(".detail-label", undefined, ( localize(16273, "Environment Variables:"))), $("code.detail-value", undefined, envStrings.join(" ")))
|
|
798
798
|
);
|
|
799
799
|
}
|
|
800
800
|
if (i < packages.length - 1) {
|
|
@@ -807,25 +807,25 @@ let McpServerEditor = class McpServerEditor extends EditorPane {
|
|
|
807
807
|
const packageSection = append(container, $(
|
|
808
808
|
".package-section",
|
|
809
809
|
undefined,
|
|
810
|
-
$(".package-section-title", undefined, ( localize(
|
|
810
|
+
$(".package-section-title", undefined, ( localize(16274, "Remote")).toLocaleUpperCase())
|
|
811
811
|
));
|
|
812
812
|
for (const remote of manifest.remotes) {
|
|
813
813
|
const packagesGrid = append(packageSection, $(".package-details"));
|
|
814
814
|
append(
|
|
815
815
|
packagesGrid,
|
|
816
|
-
$(".package-detail", undefined, $(".detail-label", undefined, ( localize(
|
|
816
|
+
$(".package-detail", undefined, $(".detail-label", undefined, ( localize(16267, "URL:"))), $(".detail-value", undefined, remote.url))
|
|
817
817
|
);
|
|
818
818
|
if (remote.type) {
|
|
819
819
|
append(
|
|
820
820
|
packagesGrid,
|
|
821
|
-
$(".package-detail", undefined, $(".detail-label", undefined, ( localize(
|
|
821
|
+
$(".package-detail", undefined, $(".detail-label", undefined, ( localize(16275, "Transport:"))), $(".detail-value", undefined, remote.type))
|
|
822
822
|
);
|
|
823
823
|
}
|
|
824
824
|
if (remote.headers && remote.headers.length > 0) {
|
|
825
825
|
const headerStrings = remote.headers.map(header => `${header.name}: ${header.value ?? ""}`);
|
|
826
826
|
append(
|
|
827
827
|
packagesGrid,
|
|
828
|
-
$(".package-detail", undefined, $(".detail-label", undefined, ( localize(
|
|
828
|
+
$(".package-detail", undefined, $(".detail-label", undefined, ( localize(16268, "Headers:"))), $(".detail-value", undefined, headerStrings.join(", ")))
|
|
829
829
|
);
|
|
830
830
|
}
|
|
831
831
|
}
|
|
@@ -904,7 +904,7 @@ let AdditionalDetailsWidget = class AdditionalDetailsWidget extends Disposable {
|
|
|
904
904
|
const categoriesContainer = append(container, $(".categories-container.additional-details-element"));
|
|
905
905
|
append(
|
|
906
906
|
categoriesContainer,
|
|
907
|
-
$(".additional-details-title", undefined, ( localize(
|
|
907
|
+
$(".additional-details-title", undefined, ( localize(16276, "Tags")))
|
|
908
908
|
);
|
|
909
909
|
const categoriesElement = append(categoriesContainer, $(".categories"));
|
|
910
910
|
for (const category of extension.gallery.topics) {
|
|
@@ -919,14 +919,14 @@ let AdditionalDetailsWidget = class AdditionalDetailsWidget extends Disposable {
|
|
|
919
919
|
const manifest = await this.mcpGalleryManifestService.getMcpGalleryManifest();
|
|
920
920
|
if (extension.repository) {
|
|
921
921
|
try {
|
|
922
|
-
resources.push([( localize(
|
|
922
|
+
resources.push([( localize(16277, "Repository")), ThemeIcon.fromId(Codicon.repo.id), ( URI.parse(extension.repository))]);
|
|
923
923
|
} catch (error) {}
|
|
924
924
|
}
|
|
925
925
|
if (manifest) {
|
|
926
926
|
const supportUri = getMcpGalleryManifestResourceUri(manifest, McpGalleryResourceType.ContactSupportUri);
|
|
927
927
|
if (supportUri) {
|
|
928
928
|
try {
|
|
929
|
-
resources.push([( localize(
|
|
929
|
+
resources.push([( localize(16278, "Contact Support")), ThemeIcon.fromId(Codicon.commentDiscussion.id), ( URI.parse(supportUri))]);
|
|
930
930
|
} catch (error) {}
|
|
931
931
|
}
|
|
932
932
|
}
|
|
@@ -934,7 +934,7 @@ let AdditionalDetailsWidget = class AdditionalDetailsWidget extends Disposable {
|
|
|
934
934
|
const extensionResourcesContainer = append(container, $(".resources-container.additional-details-element"));
|
|
935
935
|
append(
|
|
936
936
|
extensionResourcesContainer,
|
|
937
|
-
$(".additional-details-title", undefined, ( localize(
|
|
937
|
+
$(".additional-details-title", undefined, ( localize(16279, "Resources")))
|
|
938
938
|
);
|
|
939
939
|
const resourcesElement = append(extensionResourcesContainer, $(".resources"));
|
|
940
940
|
for (const [label, icon, uri] of resources) {
|
|
@@ -954,20 +954,20 @@ let AdditionalDetailsWidget = class AdditionalDetailsWidget extends Disposable {
|
|
|
954
954
|
const installInfoContainer = append(container, $(".more-info-container.additional-details-element"));
|
|
955
955
|
append(
|
|
956
956
|
installInfoContainer,
|
|
957
|
-
$(".additional-details-title", undefined, ( localize(
|
|
957
|
+
$(".additional-details-title", undefined, ( localize(16280, "Installation")))
|
|
958
958
|
);
|
|
959
959
|
const installInfo = append(installInfoContainer, $(".more-info"));
|
|
960
960
|
append(installInfo, $(
|
|
961
961
|
".more-info-entry",
|
|
962
962
|
undefined,
|
|
963
|
-
$("div.more-info-entry-name", undefined, ( localize(
|
|
963
|
+
$("div.more-info-entry-name", undefined, ( localize(16281, "Identifier"))),
|
|
964
964
|
$("code", undefined, extension.name)
|
|
965
965
|
));
|
|
966
966
|
if (extension.version) {
|
|
967
967
|
append(installInfo, $(
|
|
968
968
|
".more-info-entry",
|
|
969
969
|
undefined,
|
|
970
|
-
$("div.more-info-entry-name", undefined, ( localize(
|
|
970
|
+
$("div.more-info-entry-name", undefined, ( localize(16282, "Version"))),
|
|
971
971
|
$("code", undefined, extension.version)
|
|
972
972
|
));
|
|
973
973
|
}
|
|
@@ -977,7 +977,7 @@ let AdditionalDetailsWidget = class AdditionalDetailsWidget extends Disposable {
|
|
|
977
977
|
const moreInfoContainer = append(container, $(".more-info-container.additional-details-element"));
|
|
978
978
|
append(
|
|
979
979
|
moreInfoContainer,
|
|
980
|
-
$(".additional-details-title", undefined, ( localize(
|
|
980
|
+
$(".additional-details-title", undefined, ( localize(16283, "Marketplace")))
|
|
981
981
|
);
|
|
982
982
|
const moreInfo = append(moreInfoContainer, $(".more-info"));
|
|
983
983
|
if (gallery) {
|
|
@@ -985,14 +985,14 @@ let AdditionalDetailsWidget = class AdditionalDetailsWidget extends Disposable {
|
|
|
985
985
|
append(moreInfo, $(
|
|
986
986
|
".more-info-entry",
|
|
987
987
|
undefined,
|
|
988
|
-
$("div.more-info-entry-name", undefined, ( localize(
|
|
988
|
+
$("div.more-info-entry-name", undefined, ( localize(16281, "Identifier"))),
|
|
989
989
|
$("code", undefined, extension.name)
|
|
990
990
|
));
|
|
991
991
|
if (gallery.version) {
|
|
992
992
|
append(moreInfo, $(
|
|
993
993
|
".more-info-entry",
|
|
994
994
|
undefined,
|
|
995
|
-
$("div.more-info-entry-name", undefined, ( localize(
|
|
995
|
+
$("div.more-info-entry-name", undefined, ( localize(16282, "Version"))),
|
|
996
996
|
$("code", undefined, gallery.version)
|
|
997
997
|
));
|
|
998
998
|
}
|
|
@@ -1001,7 +1001,7 @@ let AdditionalDetailsWidget = class AdditionalDetailsWidget extends Disposable {
|
|
|
1001
1001
|
append(moreInfo, $(
|
|
1002
1002
|
".more-info-entry",
|
|
1003
1003
|
undefined,
|
|
1004
|
-
$("div.more-info-entry-name", undefined, ( localize(
|
|
1004
|
+
$("div.more-info-entry-name", undefined, ( localize(16284, "Last Released"))),
|
|
1005
1005
|
$("div", {
|
|
1006
1006
|
"title": ( ( new Date(gallery.lastUpdated)).toString())
|
|
1007
1007
|
}, fromNow(gallery.lastUpdated, true, true, true))
|
|
@@ -1011,7 +1011,7 @@ let AdditionalDetailsWidget = class AdditionalDetailsWidget extends Disposable {
|
|
|
1011
1011
|
append(moreInfo, $(
|
|
1012
1012
|
".more-info-entry",
|
|
1013
1013
|
undefined,
|
|
1014
|
-
$("div.more-info-entry-name", undefined, ( localize(
|
|
1014
|
+
$("div.more-info-entry-name", undefined, ( localize(16285, "Published"))),
|
|
1015
1015
|
$("div", {
|
|
1016
1016
|
"title": ( ( new Date(gallery.publishDate)).toString())
|
|
1017
1017
|
}, 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(16286, "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(16287, "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(16288, "Icon used for the MCP server.")));
|
|
7
|
+
const mcpServerRemoteIcon = registerIcon("mcp-server-remote", Codicon.remote, ( localize(16289, "Icon to indicate that an MCP server is for the remote user scope.")));
|
|
8
|
+
const mcpServerWorkspaceIcon = registerIcon("mcp-server-workspace", Codicon.rootFolder, ( localize(16290, "Icon to indicate that an MCP server is for the workspace scope.")));
|
|
9
|
+
const mcpStarredIcon = registerIcon("mcp-server-starred", Codicon.starFull, ( localize(16291, "Icon shown along with the starred status.")));
|
|
10
|
+
const mcpLicenseIcon = registerIcon("mcp-server-license", Codicon.law, ( localize(16292, "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(16293, "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
|
+
16294,
|
|
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(16295, "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(16296, "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(16297, "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(16298, "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(16299, "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(16300, "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
|
+
16301,
|
|
264
264
|
"Browse and install [Model Context Protocol (MCP) servers](https://code.visualstudio.com/docs/agent-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
|
+
16302,
|
|
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(16303, "Enable MCP Servers Marketplace")),
|
|
278
278
|
...defaultButtonStyles
|
|
279
279
|
})));
|
|
280
|
-
button.label = ( localize(
|
|
280
|
+
button.label = ( localize(16303, "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(16304, "Enable MCP Servers Marketplace?")),
|
|
287
287
|
custom: {
|
|
288
288
|
markdownDetails: [{
|
|
289
289
|
markdown: ( new MarkdownString(( localize(
|
|
290
|
-
|
|
290
|
+
16302,
|
|
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(16305, "Enable")),
|
|
300
300
|
run: () => true
|
|
301
301
|
}, {
|
|
302
|
-
label: ( localize(
|
|
302
|
+
label: ( localize(16306, "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(16307, "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(16308, "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(16309, "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(16309, "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(16309, "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(16309, "MCP Servers")),
|
|
568
568
|
ctorDescriptor: ( new SyncDescriptor(McpServersListView, [{
|
|
569
569
|
showWelcome: true
|
|
570
570
|
}])),
|
|
@@ -658,7 +658,7 @@ let McpWorkbenchService = class McpWorkbenchService extends Disposable {
|
|
|
658
658
|
const existing = result.get(server.name);
|
|
659
659
|
if (existing) {
|
|
660
660
|
this.logService.warn(( localize(
|
|
661
|
-
|
|
661
|
+
16311,
|
|
662
662
|
"Overwriting mcp server '{0}' from {1} with {2}.",
|
|
663
663
|
server.name,
|
|
664
664
|
server.mcpResource.path,
|
|
@@ -671,7 +671,7 @@ let McpWorkbenchService = class McpWorkbenchService extends Disposable {
|
|
|
671
671
|
const existing = result.get(server.name);
|
|
672
672
|
if (existing) {
|
|
673
673
|
this.logService.warn(( localize(
|
|
674
|
-
|
|
674
|
+
16311,
|
|
675
675
|
"Overwriting mcp server '{0}' from {1} with {2}.",
|
|
676
676
|
server.name,
|
|
677
677
|
server.mcpResource.path,
|
|
@@ -684,7 +684,7 @@ let McpWorkbenchService = class McpWorkbenchService extends Disposable {
|
|
|
684
684
|
}
|
|
685
685
|
canInstall(mcpServer) {
|
|
686
686
|
if (!(mcpServer instanceof McpWorkbenchServer)) {
|
|
687
|
-
return ( new MarkdownString()).appendText(( localize(
|
|
687
|
+
return ( new MarkdownString()).appendText(( localize(16312, "The provided object is not an mcp server.")));
|
|
688
688
|
}
|
|
689
689
|
if (mcpServer.gallery) {
|
|
690
690
|
const result = this.mcpManagementService.canInstall(mcpServer.gallery);
|
|
@@ -701,7 +701,7 @@ let McpWorkbenchService = class McpWorkbenchService extends Disposable {
|
|
|
701
701
|
return result;
|
|
702
702
|
}
|
|
703
703
|
return ( new MarkdownString()).appendText(( localize(
|
|
704
|
-
|
|
704
|
+
16313,
|
|
705
705
|
"Cannot install the '{0}' MCP Server because it is not available in this setup.",
|
|
706
706
|
mcpServer.label
|
|
707
707
|
)));
|
|
@@ -808,7 +808,7 @@ let McpWorkbenchService = class McpWorkbenchService extends Disposable {
|
|
|
808
808
|
id: USER_CONFIG_ID,
|
|
809
809
|
key: "userLocalValue",
|
|
810
810
|
target: ConfigurationTarget.USER_LOCAL,
|
|
811
|
-
label: ( localize(
|
|
811
|
+
label: ( localize(16314, "Global in {0}", this.productService.nameShort)),
|
|
812
812
|
scope: StorageScope.PROFILE,
|
|
813
813
|
order: McpCollectionSortOrder.User,
|
|
814
814
|
uri: mcpResource,
|
|
@@ -1019,7 +1019,7 @@ let McpWorkbenchService = class McpWorkbenchService extends Disposable {
|
|
|
1019
1019
|
state: McpServerEnablementState.DisabledProfile,
|
|
1020
1020
|
message: {
|
|
1021
1021
|
severity: Severity.Info,
|
|
1022
|
-
text: ( new MarkdownString(( localize(
|
|
1022
|
+
text: ( new MarkdownString(( localize(16315, "This MCP server is disabled."))))
|
|
1023
1023
|
}
|
|
1024
1024
|
};
|
|
1025
1025
|
}
|
|
@@ -1028,7 +1028,7 @@ let McpWorkbenchService = class McpWorkbenchService extends Disposable {
|
|
|
1028
1028
|
state: McpServerEnablementState.DisabledWorkspace,
|
|
1029
1029
|
message: {
|
|
1030
1030
|
severity: Severity.Info,
|
|
1031
|
-
text: ( new MarkdownString(( localize(
|
|
1031
|
+
text: ( new MarkdownString(( localize(16316, "This MCP server is disabled for this workspace."))))
|
|
1032
1032
|
}
|
|
1033
1033
|
};
|
|
1034
1034
|
}
|
|
@@ -1048,7 +1048,7 @@ let McpWorkbenchService = class McpWorkbenchService extends Disposable {
|
|
|
1048
1048
|
message: {
|
|
1049
1049
|
severity: Severity.Warning,
|
|
1050
1050
|
text: ( new MarkdownString(( localize(
|
|
1051
|
-
|
|
1051
|
+
16317,
|
|
1052
1052
|
"This MCP Server is disabled because MCP servers are configured to be disabled in the Editor. Please check your [settings]({0}).",
|
|
1053
1053
|
settingsCommandLink
|
|
1054
1054
|
))))
|
|
@@ -1062,7 +1062,7 @@ let McpWorkbenchService = class McpWorkbenchService extends Disposable {
|
|
|
1062
1062
|
message: {
|
|
1063
1063
|
severity: Severity.Warning,
|
|
1064
1064
|
text: ( new MarkdownString(( localize(
|
|
1065
|
-
|
|
1065
|
+
16318,
|
|
1066
1066
|
"This MCP Server is disabled because it is configured to be disabled in the Editor. Please check your [settings]({0}).",
|
|
1067
1067
|
settingsCommandLink
|
|
1068
1068
|
))))
|
|
@@ -1076,7 +1076,7 @@ let McpWorkbenchService = class McpWorkbenchService extends Disposable {
|
|
|
1076
1076
|
message: {
|
|
1077
1077
|
severity: Severity.Warning,
|
|
1078
1078
|
text: ( new MarkdownString(( localize(
|
|
1079
|
-
|
|
1079
|
+
16318,
|
|
1080
1080
|
"This MCP Server is disabled because it is configured to be disabled in the Editor. Please check your [settings]({0}).",
|
|
1081
1081
|
settingsCommandLink
|
|
1082
1082
|
))))
|
|
@@ -145,20 +145,20 @@ let ExtensionMcpDiscovery = ExtensionMcpDiscovery_1 = class ExtensionMcpDiscover
|
|
|
145
145
|
}
|
|
146
146
|
static _validate(user) {
|
|
147
147
|
if (!Array.isArray(user.value)) {
|
|
148
|
-
user.collector.error(( localize(
|
|
148
|
+
user.collector.error(( localize(16319, "Expected an array of MCP collections")));
|
|
149
149
|
return false;
|
|
150
150
|
}
|
|
151
151
|
for (const contribution of user.value) {
|
|
152
152
|
if (typeof contribution.id !== "string" || isFalsyOrWhitespace(contribution.id)) {
|
|
153
|
-
user.collector.error(( localize(
|
|
153
|
+
user.collector.error(( localize(16320, "Expected 'id' to be a non-empty string.")));
|
|
154
154
|
return false;
|
|
155
155
|
}
|
|
156
156
|
if (typeof contribution.label !== "string" || isFalsyOrWhitespace(contribution.label)) {
|
|
157
|
-
user.collector.error(( localize(
|
|
157
|
+
user.collector.error(( localize(16321, "Expected 'label' to be a non-empty string.")));
|
|
158
158
|
return false;
|
|
159
159
|
}
|
|
160
160
|
if (contribution.when !== undefined && (typeof contribution.when !== "string" || isFalsyOrWhitespace(contribution.when))) {
|
|
161
|
-
user.collector.error(( localize(
|
|
161
|
+
user.collector.error(( localize(16322, "Expected 'when' to be a non-empty string.")));
|
|
162
162
|
return false;
|
|
163
163
|
}
|
|
164
164
|
}
|
|
@@ -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
|
+
16323,
|
|
90
90
|
" on {0}",
|
|
91
91
|
labelService.getHostLabel(Schemas.vscodeRemote, remoteAuthority)
|
|
92
92
|
));
|