MCPcopy Create free account
hub / github.com/effect-app/libs / toggle

Function toggle

repos/effect/packages/effect/src/unstable/cli/Prompt.ts:1253–1265  ·  view source on GitHub ↗
(options: ToggleOptions)

Source from the content-addressed store, hash-verified

1251 *
1252 * **Details**
1253 *
1254 * Every printable character is appended to the filter query, so navigation is
1255 * bound to the arrow keys, `tab`, and the `Ctrl+P` / `Ctrl+N` chords used by
1256 * `readline` and `fzf` (`Ctrl+K` also moves up). `Ctrl+U` clears the query.
1257 *
1258 * **Example** (Filtering choices with autocomplete)
1259 *
1260 * ```ts import.meta.vitest
1261 * import { Prompt } from "effect/unstable/cli"
1262 *
1263 * const language = Prompt.AutoComplete({
1264 * message: "Choose a language",
1265 * choices: [
1266 * { title: "TypeScript", value: "ts" },
1267 * { title: "Rust", value: "rs" },
1268 * { title: "Kotlin", value: "kt" }

Callers

nothing calls this directly

Calls 2

handleToggleRenderFunction · 0.85
customFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…