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

Function promptModel

packages/opencode/src/cli/cmd/github.handler.ts:257–276  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

255 }
256
257 async function promptModel() {
258 const providerData = providers[provider]!
259
260 const model = await prompts.select({
261 message: "Select model",
262 maxItems: 8,
263 options: pipe(
264 providerData.models,
265 values(),
266 sortBy((x) => x.name ?? x.id),
267 map((x) => ({
268 label: x.name ?? x.id,
269 value: x.id,
270 })),
271 ),
272 })
273
274 if (prompts.isCancel(model)) throw new UI.CancelledError()
275 return model
276 }
277
278 async function installGitHubApp() {
279 const s = prompts.spinner()

Callers 1

github.handler.tsFile · 0.85

Calls 4

pipeFunction · 0.85
valuesFunction · 0.50
mapFunction · 0.50
selectMethod · 0.45

Tested by

no test coverage detected