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

Function renderChoiceDescription

packages/effect/src/unstable/cli/Prompt.ts:2537–2548  ·  view source on GitHub ↗
(
  choice: SelectChoice<A>,
  isActive: boolean,
  renderOptions?: RenderOptions | undefined
)

Source from the content-addressed store, hash-verified

2535}
2536
2537const renderChoiceDescription = <A>(
2538 choice: SelectChoice<A>,
2539 isActive: boolean,
2540 renderOptions?: RenderOptions | undefined
2541) => {
2542 if (!choice.disabled && choice.description && isActive) {
2543 return renderOptions?.plain === true
2544 ? "- " + choice.description
2545 : Ansi.annotate("- " + choice.description, Ansi.blackBright)
2546 }
2547 return ""
2548}
2549
2550const metaOptionsCount = 2
2551

Callers 3

renderMultiSelectChoicesFunction · 0.85
renderSelectChoicesFunction · 0.85

Calls 1

annotateMethod · 0.65

Tested by

no test coverage detected