MCPcopy Create free account
hub / github.com/anomalyco/opencode / method

Function method

packages/core/test/plugin/host.ts:238–250  ·  view source on GitHub ↗
(value: Integration.Method)

Source from the content-addressed store, hash-verified

236}
237
238function method(value: Integration.Method) {
239 if (value.type === "env") return { type: value.type, names: [...value.names] }
240 if (value.type === "key") return { type: value.type, label: value.label }
241 return {
242 type: value.type,
243 id: value.id,
244 label: value.label,
245 prompts: value.prompts?.map((prompt) => {
246 if (prompt.type === "text") return { ...prompt }
247 return { ...prompt, options: prompt.options.map((option) => ({ ...option })) }
248 }),
249 }
250}
251
252function internalMethod(
253 value: IntegrationOAuthMethod | IntegrationKeyMethod | IntegrationEnvMethod,

Callers 5

writeFunction · 0.50
AuthPromptsViewFunction · 0.50
nextFunction · 0.50
OAuthCodeViewFunction · 0.50
DialogConnectProviderFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected