·
1 commit
to main
since this release
Minor Changes
-
613179d: Adds a new
indicator
option tospinner
, which supports the original"dots"
loading animation or a new"timer"
loading animation.import * as p from "@clack/prompts"; const spin = p.spinner({ indicator: "timer" }); spin.start("Loading"); await sleep(3000); spin.stop("Loaded");
-
a38b2bc: Adds
stream
API which provides the same methods aslog
, but for iterable (even async) message streams. This is particularly useful for AI responses which are dynamically generated by LLMs.import * as p from "@clack/prompts"; await p.stream.step( (async function* () { yield* generateLLMResponse(question); })() );