mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-04 04:10:26 +00:00
13 lines
410 B
TypeScript
13 lines
410 B
TypeScript
import { select } from "@clack/prompts";
|
|
import { stylePromptHint, stylePromptMessage } from "./prompt-style.js";
|
|
|
|
export function selectStyled<T>(params: Parameters<typeof select<T>>[0]) {
|
|
return select({
|
|
...params,
|
|
message: stylePromptMessage(params.message),
|
|
options: params.options.map((opt) =>
|
|
opt.hint === undefined ? opt : { ...opt, hint: stylePromptHint(opt.hint) },
|
|
),
|
|
});
|
|
}
|