MCPcopy Index your code
hub / github.com/infinitered/reactotron / connectionMeta

Function connectionMeta

lib/reactotron-mcp/src/resources.ts:33–56  ·  view source on GitHub ↗
(server: ReactotronServer)

Source from the content-addressed store, hash-verified

31}
32
33function connectionMeta(server: ReactotronServer): Record<string, unknown> {
34 const apps = getApps(server)
35
36 if (apps.length === 0) {
37 return {
38 connection: "no_apps_connected",
39 hint: "No apps are connected to Reactotron. Start your React Native / React app with Reactotron configured.",
40 }
41 }
42
43 if (apps.length === 1) {
44 return {
45 connection: "single_app",
46 app: apps[0],
47 hint: `Connected to ${apps[0].name} (${apps[0].platform}). All data is from this app.`,
48 }
49 }
50
51 return {
52 connection: "multiple_apps",
53 apps,
54 hint: "Multiple apps are connected. If the user hasn't specified which app, ask them. Then pass clientId to filter data. Check the workspace's package.json name to see if it matches one of these app names.",
55 }
56}
57
58function filterByClient(
59 commands: Command[],

Callers 1

registerResourcesFunction · 0.85

Calls 1

getAppsFunction · 0.85

Tested by

no test coverage detected