fix(vision): 본문 빈 케이스 prompt 강화 — null title/summary 회귀

gemma4:26b 가 본문 없이 이미지만 있을 때 title=null/summary=null 반환.
prompt 가 "(이미지만 있음)" 만 던지는 게 신호 약함. 본문 비었으면
이미지 내용으로 한국어 채우라고 명시 + "null 반환 금지" 규칙 추가.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
th-kim0823
2026-05-12 14:15:18 +09:00
parent 4266376b23
commit b2be29bd33
2 changed files with 23 additions and 11 deletions

View File

@@ -15,9 +15,16 @@ describe('buildVisionPrompt', () => {
expect(result).toContain('work, meeting, project, todo');
});
it('uses (이미지만 있음) placeholder when text is empty', () => {
it('본문 빈 경우 이미지 묘사 + null 금지 명시 (v0.3.14+)', () => {
const result = buildVisionPrompt('', '2026-05-09', [], []);
expect(result).toContain('(이미지만 있음)');
expect(result).not.toContain('\n\n\n'); // no double-blank from empty text
expect(result).toContain('본문이 없으니');
expect(result).toContain('null 반환 금지');
expect(result).not.toContain('메모 본문:\n');
});
it('본문 있는 경우 본문 우선 + 이미지 함께 분석 명시', () => {
const result = buildVisionPrompt('회의 메모', '2026-05-09', [], []);
expect(result).toContain('메모 본문:\n회의 메모');
expect(result).toContain('첨부 이미지도 함께 분석');
});
});