We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4ca2e8b commit b263f72Copy full SHA for b263f72
cli/vibe.go
@@ -5,6 +5,7 @@ package cli
5
6
import (
7
"fmt"
8
+ "slices"
9
10
"github.com/coder/coder/v2/codersdk"
11
"github.com/coder/serpent"
@@ -29,20 +30,8 @@ func (r *RootCmd) vibe() *serpent.Command {
29
30
31
aiTasks := []codersdk.WorkspaceAgentTask{}
32
for _, resource := range workspace.LatestBuild.Resources {
- agents := resource.Agents
33
- if len(agents) == 0 {
34
- continue
35
- }
36
-
37
- for _, agent := range agents {
38
- tasks := agent.Tasks
39
- if len(tasks) == 0 {
40
41
42
43
- for _, task := range tasks {
44
- aiTasks = append(aiTasks, task)
45
+ for _, agent := range resource.Agents {
+ aiTasks = slices.Concat(aiTasks, agent.Tasks)
46
}
47
48
0 commit comments