@@ -31,46 +31,52 @@ function isLinux(): boolean {
3131// 平台特有的 MCP 服务器配置
3232const PLATFORM_SPECIFIC_SERVERS : Record < string , MCPServerConfig > = {
3333 // macOS 特有服务
34- ...( isMacOS ( ) ? {
35- 'deepchat/apple-server' : {
36- args : [ ] ,
37- descriptions : 'DeepChat内置Apple系统集成服务 (仅macOS)' ,
38- icons : '🍎' ,
39- autoApprove : [ 'all' ] ,
40- type : 'inmemory' as MCPServerType ,
41- command : 'deepchat/apple-server' ,
42- env : { } ,
43- disable : false
44- }
45- } : { } ) ,
46-
34+ ...( isMacOS ( )
35+ ? {
36+ 'deepchat/apple-server' : {
37+ args : [ ] ,
38+ descriptions : 'DeepChat内置Apple系统集成服务 (仅macOS)' ,
39+ icons : '🍎' ,
40+ autoApprove : [ 'all' ] ,
41+ type : 'inmemory' as MCPServerType ,
42+ command : 'deepchat/apple-server' ,
43+ env : { } ,
44+ disable : false
45+ }
46+ }
47+ : { } ) ,
48+
4749 // Windows 特有服务 (预留)
48- ...( isWindows ( ) ? {
49- // 'deepchat-inmemory/windows-server': {
50- // args: [],
51- // descriptions: 'DeepChat内置Windows系统集成服务 (仅Windows)',
52- // icons: '🪟',
53- // autoApprove: ['all'],
54- // type: 'inmemory' as MCPServerType,
55- // command: 'deepchat-inmemory/windows-server',
56- // env: {},
57- // disable: false
58- // }
59- } : { } ) ,
60-
50+ ...( isWindows ( )
51+ ? {
52+ // 'deepchat-inmemory/windows-server': {
53+ // args: [],
54+ // descriptions: 'DeepChat内置Windows系统集成服务 (仅Windows)',
55+ // icons: '🪟',
56+ // autoApprove: ['all'],
57+ // type: 'inmemory' as MCPServerType,
58+ // command: 'deepchat-inmemory/windows-server',
59+ // env: {},
60+ // disable: false
61+ // }
62+ }
63+ : { } ) ,
64+
6165 // Linux 特有服务 (预留)
62- ...( isLinux ( ) ? {
63- // 'deepchat-inmemory/linux-server': {
64- // args: [],
65- // descriptions: 'DeepChat内置Linux系统集成服务 (仅Linux)',
66- // icons: '🐧',
67- // autoApprove: ['all'],
68- // type: 'inmemory' as MCPServerType,
69- // command: 'deepchat-inmemory/linux-server',
70- // env: {},
71- // disable: false
72- // }
73- } : { } )
66+ ...( isLinux ( )
67+ ? {
68+ // 'deepchat-inmemory/linux-server': {
69+ // args: [],
70+ // descriptions: 'DeepChat内置Linux系统集成服务 (仅Linux)',
71+ // icons: '🐧',
72+ // autoApprove: ['all'],
73+ // type: 'inmemory' as MCPServerType,
74+ // command: 'deepchat-inmemory/linux-server',
75+ // env: {},
76+ // disable: false
77+ // }
78+ }
79+ : { } )
7480}
7581
7682// 抽取inmemory类型的服务为常量
@@ -335,8 +341,10 @@ export class McpConfHelper {
335341 }
336342
337343 // 如果有变化,更新存储
338- if ( Object . keys ( updatedServers ) . length !== Object . keys ( storedServers ) . length ||
339- serversToRemove . length > 0 ) {
344+ if (
345+ Object . keys ( updatedServers ) . length !== Object . keys ( storedServers ) . length ||
346+ serversToRemove . length > 0
347+ ) {
340348 this . mcpStore . set ( 'mcpServers' , updatedServers )
341349 }
342350
0 commit comments