diff --git a/web/frontend/src/api.ts b/web/frontend/src/api.ts index 4c6ce29..b446172 100644 --- a/web/frontend/src/api.ts +++ b/web/frontend/src/api.ts @@ -350,6 +350,8 @@ export const api = { post<{ status: string; comment: string }>(`/tasks/${id}/revise`, { comment }), runTask: (id: string) => post<{ status: string }>(`/tasks/${id}/run`, {}), + followupTask: (id: string) => + post<{ created: Task[]; pending_actions: PendingAction[]; needs_decision: boolean }>(`/tasks/${id}/followup`, {}), bootstrap: (data: { path: string; id: string; name: string }) => post<{ project: Project }>('/bootstrap', data), auditProject: (projectId: string) => diff --git a/web/frontend/src/locales/en.json b/web/frontend/src/locales/en.json index 28d7c43..39ab613 100644 --- a/web/frontend/src/locales/en.json +++ b/web/frontend/src/locales/en.json @@ -167,7 +167,9 @@ "priority_label": "Priority (1–10)", "title_label": "Title", "acceptance_criteria_label": "Acceptance criteria", - "acceptance_criteria_placeholder": "What should the output be? What result counts as success?" + "acceptance_criteria_placeholder": "What should the output be? What result counts as success?", + "create_followup": "🔗 Create Follow-up", + "generating_followup": "Generating..." }, "projectView": { "tasks_tab": "Tasks", diff --git a/web/frontend/src/locales/ru.json b/web/frontend/src/locales/ru.json index 6ed0a89..083c363 100644 --- a/web/frontend/src/locales/ru.json +++ b/web/frontend/src/locales/ru.json @@ -167,7 +167,9 @@ "priority_label": "Приоритет (1–10)", "title_label": "Заголовок", "acceptance_criteria_label": "Критерии приёмки", - "acceptance_criteria_placeholder": "Что должно быть на выходе? Какой результат считается успешным?" + "acceptance_criteria_placeholder": "Что должно быть на выходе? Какой результат считается успешным?", + "create_followup": "🔗 Создать зависимости", + "generating_followup": "Создаём..." }, "projectView": { "tasks_tab": "Задачи", diff --git a/web/frontend/src/views/TaskDetail.vue b/web/frontend/src/views/TaskDetail.vue index 5b48285..9a705fe 100644 --- a/web/frontend/src/views/TaskDetail.vue +++ b/web/frontend/src/views/TaskDetail.vue @@ -30,6 +30,7 @@ const approveLoading = ref(false) const followupResults = ref<{ id: string; title: string }[]>([]) const pendingActions = ref([]) const resolvingAction = ref(false) +const followupLoading = ref(false) // Reject modal const showReject = ref(false) @@ -212,6 +213,23 @@ async function resolveAction(action: PendingAction, choice: string) { } } +async function runFollowup() { + if (!task.value) return + followupLoading.value = true + followupResults.value = [] + try { + const res = await api.followupTask(props.id) + if (res.created?.length) { + followupResults.value = res.created.map(ft => ({ id: ft.id, title: ft.title })) + } + await load() + } catch (e: any) { + error.value = e.message + } finally { + followupLoading.value = false + } +} + async function reject() { if (!task.value || !rejectReason.value) return try { @@ -588,6 +606,13 @@ async function saveEdit() { {{ (polling || pipelineStarting) ? t('taskDetail.pipeline_running') : t('taskDetail.run_pipeline') }} + + +