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

Function buildModeSelectOption

packages/opencode/src/acp/config-option.ts:72–88  ·  view source on GitHub ↗
(input: {
  modes: readonly ConfigOptionMode[]
  currentModeId: string
})

Source from the content-addressed store, hash-verified

70}
71
72export function buildModeSelectOption(input: {
73 modes: readonly ConfigOptionMode[]
74 currentModeId: string
75}): SessionConfigOption {
76 return {
77 id: "mode",
78 name: "Session Mode",
79 category: "mode",
80 type: "select",
81 currentValue: input.currentModeId,
82 options: input.modes.map((mode) => ({
83 value: mode.id,
84 name: mode.name,
85 ...(mode.description ? { description: mode.description } : {}),
86 })),
87 }
88}
89
90export function buildConfigOptions(input: {
91 providers: readonly ConfigOptionProvider[]

Callers 2

buildConfigOptionsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected