Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d80c61a

Browse files
committed
api.ts
1 parent 6705595 commit d80c61a

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

site/src/api/api.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2133,6 +2133,26 @@ class ApiMethods {
21332133

21342134
return response.data;
21352135
};
2136+
getAITasksPrompts = async (
2137+
buildIds: TypesGen.WorkspaceBuild["id"][],
2138+
): Promise<TypesGen.AITasksPromptsResponse> => {
2139+
if (buildIds.length === 0) {
2140+
return {
2141+
prompts: {},
2142+
};
2143+
}
2144+
2145+
const response = await this.axios.get<TypesGen.AITasksPromptsResponse>(
2146+
"/api/v2/aitasks/prompts",
2147+
{
2148+
params: {
2149+
build_ids: buildIds.join(","),
2150+
},
2151+
},
2152+
);
2153+
2154+
return response.data;
2155+
};
21362156

21372157
getLicenses = async (): Promise<GetLicensesResponse[]> => {
21382158
const response = await this.axios.get("/api/v2/licenses");

0 commit comments

Comments
 (0)