From 2b3c3d727e1c9fcce0aed0944bfdaa018106a0e6 Mon Sep 17 00:00:00 2001 From: altair823 Date: Sun, 10 May 2026 11:12:13 +0900 Subject: [PATCH] =?UTF-8?q?feat(v031):=20vision=20capability=20hints=20?= =?UTF-8?q?=EC=97=90=20gemma4=20=EC=B6=94=EA=B0=80=20(=EC=82=AC=EC=9A=A9?= =?UTF-8?q?=EC=9E=90=20=EC=9A=94=EC=B2=AD)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 본인 dogfood 환경 = gemma4:e4b (텍스트). vision 변종은 현재 gemma3 (vision-capable) 또는 향후 gemma4 출시 시. 양 family 모두 hint 에 포함 — capability detection 이 future-proof. - VisionDetect.VISION_FAMILIES + VISION_NAME_HINTS 에 'gemma4' 추가 - isVisionCapable test 2건 추가 (gemma4 family / gemma4 name hint detection) - spec §1 + §2 의 'gemma3 family default' → 'gemma family — gemma3 / gemma4' 영향: 기존 detection 정확도 무영향 (set 추가만), 사용자가 gemma4 vision 변종을 설치하면 자동 인식. --- .../superpowers/specs/2026-05-09-v031-cut-f-design.md | 4 ++-- src/main/services/VisionDetect.ts | 7 +++++-- tests/unit/VisionDetect.test.ts | 11 +++++++++++ 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/docs/superpowers/specs/2026-05-09-v031-cut-f-design.md b/docs/superpowers/specs/2026-05-09-v031-cut-f-design.md index b924588..86ec424 100644 --- a/docs/superpowers/specs/2026-05-09-v031-cut-f-design.md +++ b/docs/superpowers/specs/2026-05-09-v031-cut-f-design.md @@ -12,7 +12,7 @@ ## 1. Cut 정체성 -Ollama vision 모델 (gemma3 family default) 활용 — 이미지 + raw_text 결합 prompt 또는 이미지 단독 분석 → title/summary/tags 자동 생성. F22 prerequisite (Cut A) 이미 완료. +Ollama vision 모델 (gemma family — gemma3 / gemma4 default capable) 활용 — 이미지 + raw_text 결합 prompt 또는 이미지 단독 분석 → title/summary/tags 자동 생성. F22 prerequisite (Cut A) 이미 완료. --- @@ -20,7 +20,7 @@ Ollama vision 모델 (gemma3 family default) 활용 — 이미지 + raw_text 결 | 항목 | 결정 | |---|---| -| **F24 default 모델** | gemma3 family (한국어 + 이미지 둘 다 강함, 본인 메모 `gemma4:e4b` 텍스트 모델과 같은 가족) | +| **F24 default 모델** | gemma family — gemma3 / gemma4 둘 다 vision-capable hint (한국어 + 이미지 둘 다 강함, 본인 메모 `gemma4:e4b` 텍스트 모델과 같은 가족) | | **prompt 모드** | 단일 vision 모델 호출 (vision 모델이 텍스트도 처리). 모델 capability 부족 시 2단계 fallback (자동) | | **capability detection** | app launch 시 1회 + 설정 페이지 manual refresh 버튼 | | **F23 OFF 시 자동 OFF** | `ai_enabled=false` → vision 도 자동 OFF (자명) | diff --git a/src/main/services/VisionDetect.ts b/src/main/services/VisionDetect.ts index 12adb91..5dbbf84 100644 --- a/src/main/services/VisionDetect.ts +++ b/src/main/services/VisionDetect.ts @@ -1,7 +1,10 @@ import type { SettingsService } from './SettingsService.js'; -const VISION_FAMILIES = new Set(['gemma3', 'llava', 'llama3.2-vision', 'minicpm-v', 'pixtral']); -const VISION_NAME_HINTS = ['vision', 'vl', 'multimodal', 'gemma3']; +// v0.3.1 Cut F final fix — gemma 시리즈 default 정정. 본인 dogfood 환경 = gemma4:e4b +// (텍스트). vision 변종은 gemma3 (현재 vision-capable) 또는 gemma4 (향후 출시 시). +// 양 family 모두 hint 에 포함 — capability detection 이 future-proof. +const VISION_FAMILIES = new Set(['gemma3', 'gemma4', 'llava', 'llama3.2-vision', 'minicpm-v', 'pixtral']); +const VISION_NAME_HINTS = ['vision', 'vl', 'multimodal', 'gemma3', 'gemma4']; export interface OllamaModel { name: string; diff --git a/tests/unit/VisionDetect.test.ts b/tests/unit/VisionDetect.test.ts index c2bcf1c..b99478f 100644 --- a/tests/unit/VisionDetect.test.ts +++ b/tests/unit/VisionDetect.test.ts @@ -30,6 +30,17 @@ describe('isVisionCapable', () => { const model: OllamaModel = { name: 'gemma2:9b', details: { family: 'gemma', families: ['gemma'] } }; expect(isVisionCapable(model)).toBe(false); }); + + // v0.3.1 Cut F final fix — gemma family default 정정. gemma4 도 vision-capable hint. + it('returns true for gemma4 family (future-proof)', () => { + const model: OllamaModel = { name: 'gemma4-vision:e4b', details: { family: 'gemma4' } }; + expect(isVisionCapable(model)).toBe(true); + }); + + it('returns true for gemma4 in name hints (no family)', () => { + const model: OllamaModel = { name: 'custom-gemma4:latest' }; + expect(isVisionCapable(model)).toBe(true); + }); }); // ---------------------------------------------------------------------------