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

Function renderFileFilter

packages/effect/src/cli/Prompt.ts:2464–2473  ·  view source on GitHub ↗
(state: FileState, theme: Theme, renderOptions?: RenderOptions | undefined)

Source from the content-addressed store, hash-verified

2462}
2463
2464const renderFileFilter = (state: FileState, theme: Theme, renderOptions?: RenderOptions | undefined) => {
2465 const filterValue = state.query.length === 0
2466 ? renderOptions?.plain === true
2467 ? FILE_FILTER_PLACEHOLDER
2468 : Ansi.annotate(theme.colors, FILE_FILTER_PLACEHOLDER, theme.mutedColor)
2469 : renderOptions?.plain === true
2470 ? state.query
2471 : Ansi.annotate(theme.colors, state.query, Ansi.combine(Ansi.underlined, theme.primaryColor))
2472 return `[${FILE_FILTER_LABEL}: ${filterValue}]`
2473}
2474
2475const renderFiles = (
2476 state: FileState,

Callers 2

handleFileClearFunction · 0.85
Prompt.tsFile · 0.85

Calls 2

annotateMethod · 0.65
combineMethod · 0.65

Tested by

no test coverage detected