-
Notifications
You must be signed in to change notification settings - Fork 925
feat: add the /aitasks/prompts endpoint #18464
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
Conversation
aa79b8d
to
e9e6341
Compare
e4abd39
to
d80c61a
Compare
f114f43
to
bf23151
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit. can it be /tasks
instead? down the road, we could imagine this being used to monitor status of other jobs (non ai related) or perhaps across multiple systems (AI, non AI, etc)
I know it's an unstable endpoint so not the end of the world
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good 👍
bf23151
to
1273e3c
Compare
@bpmct I'd rather we left it specific to AI tasks for now. Once we define a stable API and decide it should handle other types of tasks we can change the prefix. Since it's an experimental endpoint, we'll be able to do it at any time. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
1273e3c
to
5a42c7e
Compare
Add an endpoint to fetch AI task prompts for multiple workspace builds at the same time. A prompt is the value of the "AI Prompt" workspace build parameter. On main, the only way our API allows fetching workspace build 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 a list, and then needs to fetch the value of the
AI Prompt
parameter for every task workspace (using its latest build id), requiring an additional API call for each list item. This endpoint will allow the dashboard to make just 2 calls to render the list: one to fetch task workspaces, the other to fetch prompts.Related to coder/internal#660.