MCPcopy Create free account
hub / github.com/echoVic/blade-code / quickSelect

Method quickSelect

src/ui/components/Input.ts:254–268  ·  view source on GitHub ↗

* 快速选择(带常用选项)

(
    message: string,
    options: string[],
    defaultIndex: number = 0
  )

Source from the content-addressed store, hash-verified

252 * 快速选择(带常用选项)
253 */
254 public static async quickSelect(
255 message: string,
256 options: string[],
257 defaultIndex: number = 0
258 ): Promise<string> {
259 const choices: Choice[] = options.map(option => ({
260 name: option,
261 value: option,
262 short: option,
263 }));
264
265 return this.select(message, choices, {
266 default: options[defaultIndex],
267 });
268 }
269}

Callers

nothing calls this directly

Calls 1

selectMethod · 0.95

Tested by

no test coverage detected