Skip to content

Commit 21febc5

Browse files
authored
fix: preference categorization for MCP server and SCANOSS preferences (#16346)
Fixes GH-16338 - McpServersPreferenceSchema: remove duplicate entries and ensure headers preference is included in additionalProperties - Update SCANOSS API key preference to be categorized under AI features.
1 parent 49f0d9e commit 21febc5

File tree

2 files changed

+8
-33
lines changed

2 files changed

+8
-33
lines changed

packages/ai-mcp/src/common/mcp-preferences.ts

Lines changed: 7 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -102,41 +102,16 @@ Example configuration:\n\
102102
title: nls.localize('theia/ai/mcp/servers/serverAuthTokenHeader/title', 'Authentication Header Name'),
103103
markdownDescription: nls.localize('theia/ai/mcp/servers/serverAuthTokenHeader/mdDescription',
104104
'The header name to use for the server authentication token. If not provided, "Authorization" with "Bearer" will be used.'),
105+
},
106+
headers: {
107+
type: 'object',
108+
title: nls.localize('theia/ai/mcp/servers/headers/title', 'Headers'),
109+
markdownDescription: nls.localize('theia/ai/mcp/servers/headers/mdDescription',
110+
'Optional additional headers included with each request to the server.'),
105111
}
106112
},
107113
required: []
108114
}
109-
},
110-
autostart: {
111-
type: 'boolean',
112-
title: nls.localize('theia/ai/mcp/servers/autostart/title', 'Autostart'),
113-
markdownDescription: nls.localize('theia/ai/mcp/servers/autostart/mdDescription',
114-
'Automatically start this server when the frontend starts. Newly added servers are not immediately auto started, but on restart'),
115-
default: true
116-
},
117-
serverUrl: {
118-
type: 'string',
119-
title: nls.localize('theia/ai/mcp/servers/serverUrl/title', 'Server URL'),
120-
markdownDescription: nls.localize('theia/ai/mcp/servers/serverUrl/mdDescription',
121-
'The URL of the remote MCP server. If provided, the server will connect to this URL instead of starting a local process.'),
122-
},
123-
serverAuthToken: {
124-
type: 'string',
125-
title: nls.localize('theia/ai/mcp/servers/serverAuthToken/title', 'Authentication Token'),
126-
markdownDescription: nls.localize('theia/ai/mcp/servers/serverAuthToken/mdDescription',
127-
'The authentication token for the server, if required. This is used to authenticate with the remote server.'),
128-
},
129-
serverAuthTokenHeader: {
130-
type: 'string',
131-
title: nls.localize('theia/ai/mcp/servers/serverAuthTokenHeader/title', 'Authentication Header Name'),
132-
markdownDescription: nls.localize('theia/ai/mcp/servers/serverAuthTokenHeader/mdDescription',
133-
'The header name to use for the server authentication token. If not provided, "Authorization" with "Bearer" will be used.'),
134-
},
135-
headers: {
136-
type: 'object',
137-
title: nls.localize('theia/ai/mcp/servers/headers/title', 'Headers'),
138-
markdownDescription: nls.localize('theia/ai/mcp/servers/headers/mdDescription',
139-
'Optional additional headers included with each request to the server.'),
140115
}
141-
},
116+
}
142117
};

packages/scanoss/src/common/scanoss-preferences.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
import { PreferenceSchema } from '@theia/core/lib/common/preferences/preference-schema';
1818

19-
export const SCAN_OSS_API_KEY_PREF = 'SCANOSS.apiKey';
19+
export const SCAN_OSS_API_KEY_PREF = 'ai-features.SCANOSS.apiKey';
2020

2121
export const ScanOSSPreferencesSchema: PreferenceSchema = {
2222
properties: {

0 commit comments

Comments
 (0)