We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parent5c2022e commit81fb1d5Copy full SHA for 81fb1d5
coderd/aitasks.go
@@ -11,7 +11,6 @@ import (
11
12
"github.com/go-chi/chi/v5"
13
"github.com/google/uuid"
14
-"golang.org/x/xerrors"
15
16
"cdr.dev/slog"
17
@@ -196,13 +195,6 @@ func (api *API) tasksCreate(rw http.ResponseWriter, r *http.Request) {
196
195
// prompts and mapping status/state. This method enforces that only AI task
197
// workspaces are given.
198
func (api*API)tasksFromWorkspaces(ctx context.Context,apiWorkspaces []codersdk.Workspace) ([]codersdk.Task,error) {
199
-// Enforce that only AI task workspaces are given.
200
-for_,ws:=rangeapiWorkspaces {
201
-ifws.LatestBuild.HasAITask==nil||!*ws.LatestBuild.HasAITask {
202
-returnnil,xerrors.Errorf("workspace %s is not an AI task workspace",ws.ID)
203
-}
204
205
-
206
// Fetch prompts for each workspace build and map by build ID.
207
buildIDs:=make([]uuid.UUID,0,len(apiWorkspaces))
208
for_,ws:=rangeapiWorkspaces {