(ctx context.Context, apiClient apiClient, partialSearch string)
| 572 | } |
| 573 | |
| 574 | func getRepoSuggestions(ctx context.Context, apiClient apiClient, partialSearch string) []string { |
| 575 | searchParams := api.RepoSearchParameters{ |
| 576 | // The prompt shows 7 items so 7 effectively turns off scrolling which is similar behavior to other clients |
| 577 | MaxRepos: 7, |
| 578 | Sort: "repo", |
| 579 | } |
| 580 | |
| 581 | repos, err := apiClient.GetCodespaceRepoSuggestions(ctx, partialSearch, searchParams) |
| 582 | if err != nil { |
| 583 | return nil |
| 584 | } |
| 585 | |
| 586 | return repos |
| 587 | } |
| 588 | |
| 589 | // buildDisplayName returns display name to be used in the machine survey prompt. |
| 590 | // prebuildAvailability will be migrated to use enum values: "none", "ready", "in_progress" before Prebuild GA |
no test coverage detected