feat(cli): add coder exp tasks list (#19496)

Fixes coder/internal#892
Fixes coder/internal#896

Example output:

```
❯ coder exp task list
ID                                    NAME                         STATUS   STATE  STATE CHANGED  MESSAGE
a7a27450-ca16-4553-a6c5-9d6f04808569  task-hardcore-herschel-bd08  running  idle   5h22m3s ago    Listed root directory contents, working directory reset
50f92138-f463-4f2b-abad-1816264b065f  task-musing-dewdney-f058     running  idle   6h3m8s ago     Completed arithmetic calculation
```
This commit is contained in:
Mathias Fredriksson
2025-08-25 13:03:32 +00:00
committed by GitHub
parent cef2904108
commit 836324e641
7 changed files with 474 additions and 23 deletions
+1 -1
View File
@@ -280,7 +280,7 @@ func (api *API) tasksList(rw http.ResponseWriter, r *http.Request) {
// Ensure that we only include AI task workspaces in the results.
filter.HasAITask = sql.NullBool{Valid: true, Bool: true}
if filter.OwnerUsername == "me" || filter.OwnerUsername == "" {
if filter.OwnerUsername == "me" {
filter.OwnerID = apiKey.UserID
filter.OwnerUsername = ""
}