MCPcopy Index your code
hub / github.com/anomalyco/opencode / listState

Function listState

packages/opencode/src/cli/cmd/mcp.ts:68–80  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

66}
67
68function listState() {
69 return Effect.gen(function* () {
70 const cfg = yield* Config.Service
71 const mcp = yield* MCP.Service
72 const config = yield* cfg.get()
73 const statuses = yield* mcp.status()
74 const stored = yield* Effect.all(
75 Object.fromEntries(configuredServers(config).map(([name]) => [name, mcp.hasStoredTokens(name)])),
76 { concurrency: "unbounded" },
77 )
78 return { config, statuses, stored }
79 })
80}
81
82function authState() {
83 return Effect.gen(function* () {

Callers 1

mcp.tsFile · 0.85

Calls 4

configuredServersFunction · 0.85
getMethod · 0.65
statusMethod · 0.45
allMethod · 0.45

Tested by

no test coverage detected