fix: preallocate workspace prompt repo list
This commit is contained in:
parent
52008f59b2
commit
aad3b89850
|
|
@ -1160,7 +1160,8 @@ Before editing, identify which repository owns the task and keep changes scoped
|
|||
}
|
||||
|
||||
func workspaceRepoList(repos []domain.WorkspaceRepoRecord) string {
|
||||
lines := []string{fmt.Sprintf("- %s: .", domain.RootWorkspaceRepoName)}
|
||||
lines := make([]string, 0, 1+len(repos))
|
||||
lines = append(lines, fmt.Sprintf("- %s: .", domain.RootWorkspaceRepoName))
|
||||
for _, repo := range repos {
|
||||
lines = append(lines, fmt.Sprintf("- %s: %s", repo.Name, repo.RelativePath))
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue