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

Function renderAutoCompleteFilter

packages/effect/src/unstable/cli/Prompt.ts:3098–3111  ·  view source on GitHub ↗
(
  state: AutoCompleteState,
  options: AutoCompleteOptionsReq<A>,
  renderOptions?: RenderOptions | undefined
)

Source from the content-addressed store, hash-verified

3096) => renderPrompt("", options.message, leadingSymbol, trailingSymbol, renderOptions)
3097
3098const renderAutoCompleteFilter = <A>(
3099 state: AutoCompleteState,
3100 options: AutoCompleteOptionsReq<A>,
3101 renderOptions?: RenderOptions | undefined
3102) => {
3103 const filterValue = state.query.length === 0
3104 ? renderOptions?.plain === true
3105 ? options.filterPlaceholder
3106 : Ansi.annotate(options.filterPlaceholder, Ansi.blackBright)
3107 : renderOptions?.plain === true
3108 ? state.query
3109 : Ansi.annotate(state.query, Ansi.combine(Ansi.underlined, Ansi.cyanBright))
3110 return `[${options.filterLabel}: ${filterValue}]`
3111}
3112
3113const renderAutoCompleteOutput = <A>(
3114 state: AutoCompleteState,

Callers 1

renderAutoCompleteOutputFunction · 0.85

Calls 2

annotateMethod · 0.65
combineMethod · 0.65

Tested by

no test coverage detected