fix: AI 추천 검증을 제목·내용 둘 다로 확장
AI 추천은 제목과 내용을 함께 분석하므로, 둘 중 하나라도 비면 해당 필드에 인라인 에러(빨강 테두리+메시지)를 표시하고 요청을 중단하도록 수정. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -165,11 +165,10 @@ const aiError = ref<string | null>(null)
|
||||
// 프로젝트 설명 + 제목/내용을 분석해 카테고리별 할 일 추천을 받는다
|
||||
async function requestAiSuggestions() {
|
||||
if (aiSuggesting.value) return
|
||||
// AI 추천은 제목 기반 — 제목이 비면 인라인 에러로 안내
|
||||
if (title.value.trim().length === 0) {
|
||||
titleError.value = true
|
||||
return
|
||||
}
|
||||
// AI 추천은 제목·내용 기반 — 비면 해당 필드에 인라인 에러로 안내
|
||||
titleError.value = title.value.trim().length === 0
|
||||
contentError.value = contentText.value.trim().length === 0
|
||||
if (titleError.value || contentError.value) return
|
||||
aiSuggesting.value = true
|
||||
aiError.value = null
|
||||
aiSuggestions.value = null
|
||||
|
||||
Reference in New Issue
Block a user