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

Function filterByClient

lib/reactotron-mcp/src/resources.ts:58–74  ·  view source on GitHub ↗
(
  commands: Command[],
  server: ReactotronServer,
  clientId?: string
)

Source from the content-addressed store, hash-verified

56}
57
58function filterByClient(
59 commands: Command[],
60 server: ReactotronServer,
61 clientId?: string
62): Command[] {
63 const apps = getApps(server)
64
65 if (clientId) {
66 return commands.filter((c) => c.clientId === clientId)
67 }
68
69 if (apps.length === 1) {
70 return commands.filter((c) => c.clientId === apps[0].clientId)
71 }
72
73 return commands
74}
75
76function json(uri: URL, data: unknown, guidance?: string) {
77 return {

Callers 1

registerResourcesFunction · 0.85

Calls 2

getAppsFunction · 0.85
filterMethod · 0.80

Tested by

no test coverage detected