File tree Expand file tree Collapse file tree
packages/ai-native/src/node Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11// have to import with extension since the exports map is ./* -> ./dist/cjs/*
22import { Client } from '@modelcontextprotocol/sdk/client/index.js' ;
3- import { SSEClientTransport } from '@modelcontextprotocol/sdk/client/sse.js' ;
43import { EventSource } from 'eventsource' ;
54
65import { ILogger } from '@opensumi/ide-core-common' ;
@@ -34,6 +33,8 @@ export class SSEMCPServer implements IMCPServer {
3433 }
3534 this . logger ?. log ( `Starting server "${ this . name } " with serverHost: ${ this . serverHost } ` ) ;
3635
36+ const SSEClientTransport = ( await import ( '@modelcontextprotocol/sdk/client/sse.js' ) ) . SSEClientTransport ;
37+
3738 const transport = new SSEClientTransport ( new URL ( this . serverHost ) ) ;
3839 transport . onerror = ( error ) => {
3940 this . logger ?. error ( 'Transport Error:' , error ) ;
You can’t perform that action at this time.
0 commit comments