feat: AI 코드 검토 — 연결된 Gitea 코드로 체크리스트 구현 여부 판정
- ChecklistItem.reviewVerdict('done'|'missing'|null) 컬럼 추가 + 응답/프론트 타입 전파
- GiteaService.fetchRepoCode: 기본 브랜치 텍스트 파일 스냅샷(의존성/빌드/바이너리 제외, ~120KB 예산)
- AiService.reviewChecklist: 코드+체크리스트를 Claude 에 보내 항목별 done/missing 판정 후 체크리스트에 반영
- POST /ai/review-checklist(throttle 6/분, Claude 타임아웃 60s), Gitea 미연동/코드없음/항목없음 400
- TaskService.getTaskForReview/applyReviewVerdicts
- 프론트: TaskDetailPage 승인 요청 카드(prog/changes)에 "AI 검토" 버튼 → 체크박스 ✓(초록)/✗(빨강), 요약 배너
베스트에포트 휴리스틱(코드 일부만 검토), Gitea 연동 저장소 한정.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { useApi } from './useApi'
|
||||
import type {
|
||||
ChecklistReviewResult,
|
||||
ConversationDetail,
|
||||
ConversationSummary,
|
||||
SendResult,
|
||||
@@ -55,6 +56,17 @@ export function useAi() {
|
||||
})) as unknown as SuggestChecklistResult
|
||||
}
|
||||
|
||||
// 코드 검토 — 체크리스트 구현 여부 판정(서버가 체크리스트에 반영). 코드 양에 따라 오래 걸림
|
||||
async function reviewChecklist(payload: {
|
||||
repoId: string
|
||||
taskSeq: number
|
||||
}): Promise<ChecklistReviewResult> {
|
||||
return (await api.post('/ai/review-checklist', payload, {
|
||||
silent: true,
|
||||
timeout: 90_000,
|
||||
})) as unknown as ChecklistReviewResult
|
||||
}
|
||||
|
||||
return {
|
||||
listConversations,
|
||||
getConversation,
|
||||
@@ -62,5 +74,6 @@ export function useAi() {
|
||||
sendMessage,
|
||||
deleteConversation,
|
||||
suggestChecklist,
|
||||
reviewChecklist,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user