- Notifications
You must be signed in to change notification settings - Fork924
Commit670fa4a
authored
feat: add the /aitasks/prompts endpoint (#18464)
Add an endpoint to fetch AI task prompts for multiple workspace buildsat the same time. A prompt is the value of the "AI Prompt" workspacebuild parameter. On main, the only way our API allows fetching workspacebuild parameters is by using the `/workspacebuilds/$build_id/parameters`endpoint, requiring a separate API call for every build.The Tasks dashboard fetches Task workspaces in order to show them in alist, and then needs to fetch the value of the `AI Prompt` parameter forevery task workspace (using its latest build id), requiring anadditional API call for each list item. This endpoint will allow thedashboard to make just 2 calls to render the list: one to fetch taskworkspaces, the other to fetch prompts.<img width="1512" alt="Screenshot 2025-06-20 at 11 33 11"src="https://github.com/user-attachments/assets/92899999-e922-44c5-8325-b4b23a0d2bff"/>Related tocoder/internal#660.1 parent0238f29 commit670fa4a
File tree
16 files changed
+493
-1
lines changed- coderd
- database
- dbauthz
- dbmem
- dbmetrics
- dbmock
- queries
- codersdk
- site/src/api
16 files changed
+493
-1
lines changedLines changed: 63 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + |
Lines changed: 141 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + |
Lines changed: 8 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
939 | 939 |
| |
940 | 940 |
| |
941 | 941 |
| |
| 942 | + | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
942 | 950 |
| |
943 | 951 |
| |
944 | 952 |
| |
|
Lines changed: 13 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3281 | 3281 |
| |
3282 | 3282 |
| |
3283 | 3283 |
| |
| 3284 | + | |
| 3285 | + | |
| 3286 | + | |
| 3287 | + | |
| 3288 | + | |
| 3289 | + | |
| 3290 | + | |
| 3291 | + | |
| 3292 | + | |
3284 | 3293 |
| |
3285 | 3294 |
| |
3286 | 3295 |
| |
| |||
5266 | 5275 |
| |
5267 | 5276 |
| |
5268 | 5277 |
| |
| 5278 | + | |
| 5279 | + | |
| 5280 | + | |
| 5281 | + | |
5269 | 5282 |
| |
5270 | 5283 |
| |
5271 | 5284 |
| |
|
Lines changed: 8 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2012 | 2012 |
| |
2013 | 2013 |
| |
2014 | 2014 |
| |
| 2015 | + | |
| 2016 | + | |
| 2017 | + | |
| 2018 | + | |
| 2019 | + | |
| 2020 | + | |
| 2021 | + | |
| 2022 | + | |
2015 | 2023 |
| |
2016 | 2024 |
| |
2017 | 2025 |
| |
|
Lines changed: 29 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
7960 | 7960 |
| |
7961 | 7961 |
| |
7962 | 7962 |
| |
| 7963 | + | |
| 7964 | + | |
| 7965 | + | |
| 7966 | + | |
| 7967 | + | |
7963 | 7968 |
| |
7964 | 7969 |
| |
7965 | 7970 |
| |
| |||
13901 | 13906 |
| |
13902 | 13907 |
| |
13903 | 13908 |
| |
| 13909 | + | |
| 13910 | + | |
| 13911 | + | |
| 13912 | + | |
| 13913 | + | |
| 13914 | + | |
| 13915 | + | |
| 13916 | + | |
| 13917 | + | |
| 13918 | + | |
| 13919 | + | |
| 13920 | + | |
| 13921 | + | |
| 13922 | + | |
| 13923 | + | |
| 13924 | + | |
| 13925 | + | |
| 13926 | + | |
| 13927 | + | |
| 13928 | + | |
| 13929 | + | |
| 13930 | + | |
| 13931 | + | |
| 13932 | + | |
13904 | 13933 |
| |
13905 | 13934 |
| |
13906 | 13935 |
| |
|
Lines changed: 14 additions & 0 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.
Lines changed: 30 additions & 0 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.
0 commit comments
Comments
(0)