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