Skip to content

Commit d9cb6e3

Browse files
committed
Disabling sending started event in remote MCP
1 parent cd29bc3 commit d9cb6e3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/lib/device-cache.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import fs from "fs";
22
import os from "os";
33
import path from "path";
44
import { apiClient } from "./apiClient.js";
5+
import config from "../config.js";
56

67
const CACHE_DIR = path.join(os.homedir(), ".browserstack", "combined_cache");
78
const CACHE_FILE = path.join(CACHE_DIR, "data.json");
@@ -69,6 +70,9 @@ export async function getDevicesAndBrowsers(
6970
// Rate limiter for started event (3H)
7071
export function shouldSendStartedEvent(): boolean {
7172
try {
73+
if(config && config.REMOTE_MCP){
74+
return false;
75+
}
7276
if (!fs.existsSync(CACHE_DIR)) {
7377
fs.mkdirSync(CACHE_DIR, { recursive: true });
7478
}

0 commit comments

Comments
 (0)