3
3
* Licensed under the MIT License. See License.txt in the project root for license information.
4
4
*--------------------------------------------------------------------------------------------*/
5
5
6
- import { localize , localize2 } from '../../../../nls.js' ;
6
+ import { localize } from '../../../../nls.js' ;
7
7
import { registerAction2 } from '../../../../platform/actions/common/actions.js' ;
8
- import { ContextKeyExpr } from '../../../../platform/contextkey/common/contextkey.js' ;
9
8
import { SyncDescriptor } from '../../../../platform/instantiation/common/descriptors.js' ;
10
9
import { InstantiationType , registerSingleton } from '../../../../platform/instantiation/common/extensions.js' ;
11
10
import * as jsonContributionRegistry from '../../../../platform/jsonschemas/common/jsonContributionRegistry.js' ;
@@ -14,10 +13,7 @@ import { Registry } from '../../../../platform/registry/common/platform.js';
14
13
import { EditorPaneDescriptor , IEditorPaneRegistry } from '../../../browser/editor.js' ;
15
14
import { registerWorkbenchContribution2 , WorkbenchPhase } from '../../../common/contributions.js' ;
16
15
import { EditorExtensions } from '../../../common/editor.js' ;
17
- import { IViewsRegistry , Extensions as ViewExtensions } from '../../../common/views.js' ;
18
16
import { mcpSchemaId } from '../../../services/configuration/common/configuration.js' ;
19
- import { VIEW_CONTAINER } from '../../extensions/browser/extensions.contribution.js' ;
20
- import { DefaultViewsContext , SearchMcpServersContext } from '../../extensions/common/extensions.js' ;
21
17
import { ExtensionMcpDiscovery } from '../common/discovery/extensionMcpDiscovery.js' ;
22
18
import { InstalledMcpServersDiscovery } from '../common/discovery/installedMcpServersDiscovery.js' ;
23
19
import { mcpDiscoveryRegistry } from '../common/discovery/mcpDiscovery.js' ;
@@ -32,18 +28,17 @@ import { IMcpRegistry } from '../common/mcpRegistryTypes.js';
32
28
import { McpResourceFilesystem } from '../common/mcpResourceFilesystem.js' ;
33
29
import { McpSamplingService } from '../common/mcpSamplingService.js' ;
34
30
import { McpService } from '../common/mcpService.js' ;
35
- import { HasInstalledMcpServersContext , IMcpElicitationService , IMcpSamplingService , IMcpService , IMcpWorkbenchService , InstalledMcpServersViewId } from '../common/mcpTypes.js' ;
31
+ import { IMcpElicitationService , IMcpSamplingService , IMcpService , IMcpWorkbenchService } from '../common/mcpTypes.js' ;
36
32
import { McpAddContextContribution } from './mcpAddContextContribution.js' ;
37
- import { AddConfigurationAction , EditStoredInput , InstallFromActivation , ListMcpServerCommand , McpBrowseCommand , McpBrowseResourcesCommand , McpConfigureSamplingModels , MCPServerActionRendering , McpServerOptionsCommand , McpStartPromptingServerCommand , RemoveStoredInput , ResetMcpCachedTools , ResetMcpTrustCommand , RestartServer , ShowConfiguration , ShowInstalledMcpServersCommand , ShowOutput , StartServer , StopServer } from './mcpCommands.js' ;
33
+ import { AddConfigurationAction , EditStoredInput , ListMcpServerCommand , McpBrowseCommand , McpBrowseResourcesCommand , McpConfigureSamplingModels , MCPServerActionRendering , McpServerOptionsCommand , McpStartPromptingServerCommand , RemoveStoredInput , ResetMcpCachedTools , ResetMcpTrustCommand , RestartServer , ShowConfiguration , ShowInstalledMcpServersCommand , ShowOutput , StartServer , StopServer } from './mcpCommands.js' ;
38
34
import { McpDiscovery } from './mcpDiscovery.js' ;
39
35
import { McpElicitationService } from './mcpElicitationService.js' ;
40
36
import { McpLanguageFeatures } from './mcpLanguageFeatures.js' ;
41
37
import { McpConfigMigrationContribution } from './mcpMigration.js' ;
42
38
import { McpResourceQuickAccess } from './mcpResourceQuickAccess.js' ;
43
39
import { McpServerEditor } from './mcpServerEditor.js' ;
44
40
import { McpServerEditorInput } from './mcpServerEditorInput.js' ;
45
- import { DefaultBrowseMcpServersView , McpServersListView } from './mcpServersView.js' ;
46
- import { McpUrlHandler } from './mcpUrlHandler.js' ;
41
+ import { McpServersViewsContribution } from './mcpServersView.js' ;
47
42
import { MCPContextsInitialisation , McpWorkbenchService } from './mcpWorkbenchService.js' ;
48
43
49
44
registerSingleton ( IMcpRegistry , McpRegistry , InstantiationType . Delayed ) ;
@@ -61,7 +56,6 @@ mcpDiscoveryRegistry.register(new SyncDescriptor(CursorWorkspaceMcpDiscoveryAdap
61
56
registerWorkbenchContribution2 ( 'mcpDiscovery' , McpDiscovery , WorkbenchPhase . AfterRestored ) ;
62
57
registerWorkbenchContribution2 ( 'mcpContextKeys' , McpContextKeysController , WorkbenchPhase . BlockRestore ) ;
63
58
registerWorkbenchContribution2 ( 'mcpLanguageFeatures' , McpLanguageFeatures , WorkbenchPhase . Eventually ) ;
64
- registerWorkbenchContribution2 ( 'mcpUrlHandler' , McpUrlHandler , WorkbenchPhase . BlockRestore ) ;
65
59
registerWorkbenchContribution2 ( 'mcpResourceFilesystem' , McpResourceFilesystem , WorkbenchPhase . BlockRestore ) ;
66
60
67
61
registerAction2 ( ListMcpServerCommand ) ;
@@ -74,7 +68,6 @@ registerAction2(EditStoredInput);
74
68
registerAction2 ( StartServer ) ;
75
69
registerAction2 ( StopServer ) ;
76
70
registerAction2 ( ShowOutput ) ;
77
- registerAction2 ( InstallFromActivation ) ;
78
71
registerAction2 ( RestartServer ) ;
79
72
registerAction2 ( ShowConfiguration ) ;
80
73
registerAction2 ( McpBrowseCommand ) ;
@@ -87,37 +80,11 @@ registerWorkbenchContribution2('mcpActionRendering', MCPServerActionRendering, W
87
80
registerWorkbenchContribution2 ( 'mcpAddContext' , McpAddContextContribution , WorkbenchPhase . Eventually ) ;
88
81
registerWorkbenchContribution2 ( MCPContextsInitialisation . ID , MCPContextsInitialisation , WorkbenchPhase . AfterRestored ) ;
89
82
registerWorkbenchContribution2 ( McpConfigMigrationContribution . ID , McpConfigMigrationContribution , WorkbenchPhase . Eventually ) ;
83
+ registerWorkbenchContribution2 ( McpServersViewsContribution . ID , McpServersViewsContribution , WorkbenchPhase . AfterRestored ) ;
90
84
91
85
const jsonRegistry = < jsonContributionRegistry . IJSONContributionRegistry > Registry . as ( jsonContributionRegistry . Extensions . JSONContribution ) ;
92
86
jsonRegistry . registerSchema ( mcpSchemaId , mcpServerSchema ) ;
93
87
94
- Registry . as < IViewsRegistry > ( ViewExtensions . ViewsRegistry ) . registerViews ( [
95
- {
96
- id : InstalledMcpServersViewId ,
97
- name : localize2 ( 'mcp-installed' , "MCP Servers - Installed" ) ,
98
- ctorDescriptor : new SyncDescriptor ( McpServersListView , [ { showWelcomeOnEmpty : false } ] ) ,
99
- when : ContextKeyExpr . and ( DefaultViewsContext , HasInstalledMcpServersContext ) ,
100
- weight : 40 ,
101
- order : 4 ,
102
- canToggleVisibility : true
103
- } ,
104
- {
105
- id : 'workbench.views.mcp.default.marketplace' ,
106
- name : localize2 ( 'mcp' , "MCP Servers" ) ,
107
- ctorDescriptor : new SyncDescriptor ( DefaultBrowseMcpServersView , [ { showWelcomeOnEmpty : true } ] ) ,
108
- when : ContextKeyExpr . and ( DefaultViewsContext , HasInstalledMcpServersContext . toNegated ( ) ) ,
109
- weight : 40 ,
110
- order : 4 ,
111
- canToggleVisibility : true
112
- } ,
113
- {
114
- id : 'workbench.views.mcp.marketplace' ,
115
- name : localize2 ( 'mcp' , "MCP Servers" ) ,
116
- ctorDescriptor : new SyncDescriptor ( McpServersListView , [ { showWelcomeOnEmpty : true } ] ) ,
117
- when : ContextKeyExpr . and ( SearchMcpServersContext ) ,
118
- }
119
- ] , VIEW_CONTAINER ) ;
120
-
121
88
Registry . as < IEditorPaneRegistry > ( EditorExtensions . EditorPane ) . registerEditorPane (
122
89
EditorPaneDescriptor . create (
123
90
McpServerEditor ,
0 commit comments