feat(KB-629): complete Step 2 — add batchUpdateTaskModels API client function

This commit is contained in:
gsxdsm
2026-03-31 18:10:14 -07:00
parent 66aec53543
commit 21f0454eef

View File

@@ -138,6 +138,34 @@ export function updateTask(id: string, updates: { title?: string; description?:
});
}
/**
* Batch update AI model configuration for multiple tasks.
* @param taskIds - Array of task IDs to update
* @param modelProvider - Executor model provider (optional, null to clear)
* @param modelId - Executor model ID (optional, null to clear)
* @param validatorModelProvider - Validator model provider (optional, null to clear)
* @param validatorModelId - Validator model ID (optional, null to clear)
* @returns Promise with updated tasks and count
*/
export function batchUpdateTaskModels(
taskIds: string[],
modelProvider?: string | null,
modelId?: string | null,
validatorModelProvider?: string | null,
validatorModelId?: string | null,
): Promise<{ updated: Task[]; count: number }> {
return api<{ updated: Task[]; count: number }>("/tasks/batch-update-models", {
method: "POST",
body: JSON.stringify({
taskIds,
modelProvider,
modelId,
validatorModelProvider,
validatorModelId,
}),
});
}
export function moveTask(id: string, column: Column): Promise<Task> {
return api<Task>(`/tasks/${id}/move`, {
method: "POST",