chore: add fields to codersdk.Task (#19619)

Closes https://github.com/coder/internal/issues/949

Adds the following fields to `codersdk.Task`

- OwnerName
- TemplateName
- TemplateDisplayName
- TemplateIcon
- WorkspaceAgentID
- WorkspaceAgentLifecycle
- WorkspaceAgentHealth

The implementation is unfortunately not compatible with multiple agents
as we have no reliable way to tell which agent has the AI task running
in it. For now we just pick the first agent found, but in the future
this will need to be changed.
This commit is contained in:
Danielle Maywood
2025-08-28 17:28:47 +01:00
committed by GitHub
parent c095e9ca60
commit 43765864e5
4 changed files with 67 additions and 22 deletions
+7
View File
@@ -188,9 +188,16 @@ STATE CHANGED STATUS STATE MESSAGE
"id": "11111111-1111-1111-1111-111111111111",
"organization_id": "00000000-0000-0000-0000-000000000000",
"owner_id": "00000000-0000-0000-0000-000000000000",
"owner_name": "",
"name": "",
"template_id": "00000000-0000-0000-0000-000000000000",
"template_name": "",
"template_display_name": "",
"template_icon": "",
"workspace_id": null,
"workspace_agent_id": null,
"workspace_agent_lifecycle": null,
"workspace_agent_health": null,
"initial_prompt": "",
"status": "running",
"current_state": {