Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix
  • Loading branch information
mafredri committed Aug 22, 2025
commit fdad499012357503b7e168e0547169b05672dff6
3 changes: 2 additions & 1 deletion coderd/aitasks.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (

"github.com/go-chi/chi/v5"
"github.com/google/uuid"
"golang.org/x/xerrors"

"cdr.dev/slog"

Expand Down Expand Up @@ -198,7 +199,7 @@ func (api *API) tasksFromWorkspaces(ctx context.Context, apiWorkspaces []codersd
// Enforce that only AI task workspaces are given.
for _, ws := range apiWorkspaces {
if ws.LatestBuild.HasAITask == nil || !*ws.LatestBuild.HasAITask {
return nil, fmt.Errorf("workspace %s is not an AI task workspace", ws.ID)
return nil, xerrors.Errorf("workspace %s is not an AI task workspace", ws.ID)
}
}

Expand Down
2 changes: 1 addition & 1 deletion coderd/aitasks_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ func TestAITasksPrompts(t *testing.T) {
func TestTasks(t *testing.T) {
t.Parallel()

createAITemplate := func(t *testing.T, client *coderdtest.Client, user coderdtest.User) codersdk.Template {
createAITemplate := func(t *testing.T, client *codersdk.Client, user codersdk.CreateFirstUserResponse) codersdk.Template {
t.Helper()

// Create a template version that supports AI tasks with the AI Prompt parameter.
Expand Down
Loading