MCPcopy
hub / github.com/ChatGPTNextWeb/NextChat / getClientConfig

Function getClientConfig

app/config/client.ts:3–13  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1import { BuildConfig, getBuildConfig } from "./build";
2
3export function getClientConfig() {
4 if (typeof document !== "undefined") {
5 // client side
6 return JSON.parse(queryMeta("config") || "{}") as BuildConfig;
7 }
8
9 if (typeof process !== "undefined") {
10 // server side
11 return getBuildConfig();
12 }
13}
14
15function queryMeta(key: string, defaultValue?: string): string {
16 let ret: string;

Callers 15

RootLayoutFunction · 0.90
shareMethod · 0.90
getHeadersFunction · 0.90
pathMethod · 0.90
pathMethod · 0.90
pathMethod · 0.90
pathMethod · 0.90
chatMethod · 0.90
pathMethod · 0.90
pathMethod · 0.90
pathMethod · 0.90
pathMethod · 0.90

Calls 2

getBuildConfigFunction · 0.90
queryMetaFunction · 0.85

Tested by

no test coverage detected