MCPcopy Index your code
hub / github.com/changesets/changesets / askCheckboxPlus

Function askCheckboxPlus

packages/cli/src/utils/cli-utilities.ts:50–79  ·  view source on GitHub ↗
(
  message: string,
  choices: Array<any>,
  format?: (arg: any) => any
)

Source from the content-addressed store, hash-verified

48};
49
50async function askCheckboxPlus(
51 message: string,
52 choices: Array<any>,
53 format?: (arg: any) => any
54): Promise<Array<string>> {
55 const name = `CheckboxPlus-${serialId()}`;
56
57 return prompt({
58 type: "autocomplete",
59 name,
60 message,
61 prefix,
62 multiple: true,
63 choices,
64 format,
65 limit: getLimit(),
66 onCancel: cancelFlow,
67 symbols: {
68 indicator: symbols.radioOff,
69 checked: symbols.radioOn,
70 },
71 indicator(state: any, choice: any) {
72 return choice.enabled ? state.symbols.checked : state.symbols.indicator;
73 },
74 } as ArrayPromptOptions)
75 .then((responses: any) => responses[name])
76 .catch((err: unknown) => {
77 error(err);
78 });
79}
80
81async function askQuestion(message: string): Promise<string> {
82 const name = `Question-${serialId()}`;

Callers

nothing calls this directly

Calls 2

errorFunction · 0.90
getLimitFunction · 0.85

Tested by

no test coverage detected