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

Function clearField

packages/opencode/src/mcp/auth.ts:122–130  ·  view source on GitHub ↗
(field: keyof Entry, spanName: string)

Source from the content-addressed store, hash-verified

120 })
121
122 const clearField = (field: keyof Entry, spanName: string) =>
123 Effect.fn(`McpAuth.${spanName}`)(function* (mcpName: string) {
124 yield* mutate((data) => {
125 const entry = data[mcpName]
126 if (!entry) return undefined
127 delete entry[field]
128 return { ...data, [mcpName]: entry }
129 })
130 })
131
132 const updateTokens = updateField("tokens", "updateTokens")
133 const updateClientInfo = updateField("clientInfo", "updateClientInfo")

Callers 1

auth.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected