[READ-ONLY] Mirror of https://github.com/bombshell-dev/clack. Effortlessly build beautiful command-line apps bomb.sh/docs/clack/basics/getting-started/
cli command-line command-line-app node prompt prompts
5

Configure Feed

Select the types of activity you want to include in your feed.

chore: type

Simon He (Nov 14, 2024, 8:12 PM +0800) a6add8cc e09a50eb

+6 -6
+3 -5
packages/core/src/prompts/search.ts
··· 54 54 const value = this.options[this.selectCursor]; 55 55 if (this.selected.includes(value)) { 56 56 this.selected = this.selected.filter((v) => v !== value); 57 - } 58 - else if (this.selected.length >= this.maxItems) { 59 - return 60 - } 61 - else { 57 + } else if (this.selected.length >= this.maxItems) { 58 + return; 59 + } else { 62 60 this.selected.push(value); 63 61 } 64 62 } else {
+3 -1
packages/prompts/src/index.ts
··· 318 318 }).prompt() as Promise<Value | symbol>; 319 319 }; 320 320 321 - export const search = <Value, MaxItems extends number>(opts: SearchOptions<Value, MaxItems>) => { 321 + export const search = <Value, MaxItems extends number = 1>( 322 + opts: SearchOptions<Value, MaxItems> 323 + ) => { 322 324 const opt = ( 323 325 option: Option<Value>, 324 326 state: