MCPcopy
hub / github.com/anomalyco/opencode / entries

Function entries

packages/opencode/src/cli/cmd/mcp.ts:475–482  ·  view source on GitHub ↗
(values: string[], kind: string)

Source from the content-addressed store, hash-verified

473 }
474
475 const entries = (values: string[], kind: string) =>
476 Object.fromEntries(
477 values.map((entry) => {
478 const index = entry.indexOf("=")
479 if (index < 1) throw new Error(`Invalid ${kind}: ${entry}. Expected KEY=VALUE`)
480 return [entry.slice(0, index), entry.slice(index + 1)]
481 }),
482 )
483 const environment = entries(args.env ?? [], "environment variable")
484 const headers = entries(args.header ?? [], "HTTP header")
485 const mcpConfig: ConfigMCPV1.Info = args.url

Callers 15

mcp.tsFile · 0.70
useCommandSlashesFunction · 0.50
DialogModelFunction · 0.50
CommandPaletteDialogFunction · 0.50
DialogMcpFunction · 0.50
DialogSelectFunction · 0.50
WhichKeyPanelFunction · 0.50
RunCommandMenuBodyFunction · 0.50
RunSubagentSelectBodyFunction · 0.50
RunSkillSelectBodyFunction · 0.50
RunVariantSelectBodyFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected