Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
7 changes: 7 additions & 0 deletions coderd/apidoc/docs.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions coderd/apidoc/swagger.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions coderd/workspacebuilds.go
Original file line number Diff line number Diff line change
Expand Up @@ -1078,6 +1078,14 @@ func (api *API) convertWorkspaceBuild(
if build.TemplateVersionPresetID.Valid {
presetID = &build.TemplateVersionPresetID.UUID
}
var hasAITask *bool
if build.HasAITask.Valid {
hasAITask = &build.HasAITask.Bool
}
var aiTasksSidebarAppID *uuid.UUID
if build.AITasksSidebarAppID.Valid {
aiTasksSidebarAppID = &build.AITasksSidebarAppID.UUID
Comment on lines +1085 to +1087
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
var aiTasksSidebarAppID *uuid.UUID
if build.AITasksSidebarAppID.Valid {
aiTasksSidebarAppID = &build.AITasksSidebarAppID.UUID
var aiTaskSidebarAppID *uuid.UUID
if build.AITaskSidebarAppID.Valid {
aiTaskSidebarAppID = &build.AITaskSidebarAppID.UUID

}

apiJob := convertProvisionerJob(job)
transition := codersdk.WorkspaceTransition(build.Transition)
Expand Down Expand Up @@ -1105,6 +1113,8 @@ func (api *API) convertWorkspaceBuild(
DailyCost: build.DailyCost,
MatchedProvisioners: &matchedProvisioners,
TemplateVersionPresetID: presetID,
HasAITask: hasAITask,
AITaskSidebarAppID: aiTasksSidebarAppID,
}, nil
}

Expand Down
2 changes: 2 additions & 0 deletions codersdk/workspacebuilds.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ type WorkspaceBuild struct {
DailyCost int32 `json:"daily_cost"`
MatchedProvisioners *MatchedProvisioners `json:"matched_provisioners,omitempty"`
TemplateVersionPresetID *uuid.UUID `json:"template_version_preset_id" format:"uuid"`
HasAITask *bool `json:"has_ai_task,omitempty"`
AITaskSidebarAppID *uuid.UUID `json:"ai_task_sidebar_app_id,omitempty" format:"uuid"`
}

// WorkspaceResource describes resources used to create a workspace, for instance:
Expand Down
12 changes: 12 additions & 0 deletions docs/reference/api/builds.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions docs/reference/api/schemas.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions docs/reference/api/workspaces.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions site/src/api/typesGenerated.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading