File size: 488 Bytes
52c6f5c
 
893b0be
 
 
 
 
 
 
 
 
52c6f5c
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import { env } from "$env/dynamic/public";

export enum TEST_IDS {
	checkpoints_trigger,
	checkpoints_menu,
	checkpoint,

	reset,

	message,
}

export function isMcpEnabled(): boolean {
	const envEnabled = env.PUBLIC_ENABLE_MCP === "true";
	if (envEnabled) return true;

	if (typeof window === "undefined") return false;

	const urlParams = new URLSearchParams(window.location.search);
	const hasQueryParam = urlParams.has("mcp") || urlParams.has("enable-mcp");

	return hasQueryParam;
}