File tree Expand file tree Collapse file tree 1 file changed +15
-4
lines changed Expand file tree Collapse file tree 1 file changed +15
-4
lines changed Original file line number Diff line number Diff line change 1
- // File: src/tools/live.ts
2
1
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js" ;
3
2
import { z } from "zod" ;
4
3
import logger from "../logger.js" ;
5
4
import { startBrowserSession } from "./live-utils/start-session.js" ;
6
5
import { PlatformType } from "./live-utils/types.js" ;
7
6
import { trackMCP } from "../lib/instrumentation.js" ;
8
7
import { BrowserStackConfig } from "../lib/types.js" ;
8
+ import globalConfig from "../config.js" ;
9
9
10
10
// Define the schema shape
11
11
const LiveArgsShape = {
@@ -97,13 +97,24 @@ async function runBrowserSession(rawArgs: any, config: BrowserStackConfig) {
97
97
? await launchDesktopSession ( args , config )
98
98
: await launchMobileSession ( args , config ) ;
99
99
100
- return {
101
- content : [
100
+ let response = [
102
101
{
103
102
type : "text" as const ,
104
103
text : `✅ Session started. If it didn't open automatically, visit:\n${ launchUrl } ` ,
105
104
} ,
106
- ] ,
105
+ ] ;
106
+
107
+ if ( globalConfig . REMOTE_MCP ) {
108
+ response = [
109
+ {
110
+ type : "text" as const ,
111
+ text : `✅ To start the session. Click on ${ launchUrl } ` ,
112
+ } ,
113
+ ] ;
114
+ }
115
+
116
+ return {
117
+ content : response ,
107
118
} ;
108
119
}
109
120
You can’t perform that action at this time.
0 commit comments