Skip to content

chore: add AI-tasks-specific fields to codersdk.WorkspaceBuild #18436

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 20, 2025

Conversation

hugodutka
Copy link
Contributor

@hugodutka hugodutka commented Jun 18, 2025

This will be needed by the frontend on the /task/$id page to display the app in the sidebar.

Related to #18158

@hugodutka hugodutka marked this pull request as ready for review June 19, 2025 14:48
@hugodutka hugodutka requested a review from dannykopping June 19, 2025 14:48
@@ -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"`
AITasksSidebarAppID *uuid.UUID `json:"ai_tasks_sidebar_app_id,omitempty" format:"uuid"`
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
AITasksSidebarAppID *uuid.UUID `json:"ai_tasks_sidebar_app_id,omitempty" format:"uuid"`
AITaskSidebarAppID *uuid.UUID `json:"ai_task_sidebar_app_id,omitempty" format:"uuid"`

To align with a change I have in-flight.

@hugodutka hugodutka force-pushed the hugodutka/ai-tasks-codersdk-wb branch from 6a03c80 to 462415d Compare June 19, 2025 19:52
@hugodutka hugodutka force-pushed the hugodutka/ai-tasks-codersdk-wb branch from 462415d to 5b7cae3 Compare June 19, 2025 20:26
Comment on lines +1085 to +1087
var aiTasksSidebarAppID *uuid.UUID
if build.AITasksSidebarAppID.Valid {
aiTasksSidebarAppID = &build.AITasksSidebarAppID.UUID
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

@hugodutka hugodutka merged commit 32239b2 into main Jun 20, 2025
37 of 39 checks passed
@hugodutka hugodutka deleted the hugodutka/ai-tasks-codersdk-wb branch June 20, 2025 08:59
@github-actions github-actions bot locked and limited conversation to collaborators Jun 20, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants