MCPcopy Create free account
hub / github.com/Effect-TS/effect / renderSelectOutput

Function renderSelectOutput

packages/effect/src/cli/Prompt.ts:3321–3330  ·  view source on GitHub ↗
(
  leadingSymbol: string,
  trailingSymbol: string,
  options: SelectOptionsReq<A>,
  theme: Theme,
  renderOptions?: RenderOptions | undefined
)

Source from the content-addressed store, hash-verified

3319 Option.getOrElse(Arr.findFirstIndex(state.filtered, (index) => index === state.index), () => 0)
3320
3321const renderSelectOutput = <A>(
3322 leadingSymbol: string,
3323 trailingSymbol: string,
3324 options: SelectOptionsReq<A>,
3325 theme: Theme,
3326 renderOptions?: RenderOptions | undefined
3327): string | undefined =>
3328 options.message === undefined
3329 ? undefined
3330 : renderPrompt("", options.message, leadingSymbol, trailingSymbol, theme, renderOptions)
3331
3332const withSelectHeader = (header: string | undefined, body: string): string =>
3333 header === undefined ? body : header + "\n" + body

Callers 3

Prompt.tsFile · 0.85
handleMultiSelectClearFunction · 0.85
handleSelectClearFunction · 0.85

Calls 1

renderPromptFunction · 0.85

Tested by

no test coverage detected