d3ro-voice/apps/desktop
윤찬 9d12133cfe fix(desktop): qwen3 reasoning 모드로 LLM refine 39초 + 빈 응답
증상:
- STT 426ms로 빠른데 LLM refine 단계가 39초 소요 후 빈 문자열 반환
- _completeSession('') → finalText.length === 0이라 paste 호출 자체 건너뜀
- 사용자에게는 '느리고 paste 안 됨'으로 보임

원인:
- 사용자가 ollama pull qwen3:4b 한 직후 첫 호출 (모델 cold start 일부 있음)
- qwen3는 reasoning model이라 응답에 <think>...</think> 블록을 길게 출력
- system prompt에 '/no_think' 토큰 없음 → reasoning mode ON
- generate()는 data.response.trim() 그대로 반환 → think 블록 + 빈 본문이면
  trim 후 빈 문자열
- 빈 문자열에 대한 fallback이 없어서 그대로 _completeSession('')

수정:
- SYSTEM_PROMPTS 모두에 '/no_think' 헤더 추가
  - qwen3 reasoning 비활성화 → 응답 속도 대폭 단축
  - 다른 모델(llama, mistral, gemma)은 토큰 무시 → 호환성 OK
- stripReasoningBlocks() 추가
  - <think>...</think> + <thinking>...</thinking> 블록 제거 (gi flag)
  - /no_think를 무시하는 모델 + 응답에 think tag가 섞여 들어오는 케이스 안전망
- processText() 결과:
  - stripReasoningBlocks(result.text)
  - 빈 문자열이면 원본 transcript fallback + warn 로그
2026-04-11 09:28:55 +09:00
..
build feat(V2-5): macOS 빌드 지원 — 플랫폼 분기 + electron-builder mac 타겟 + CI 2026-04-08 15:57:16 +09:00
resources feat(V2-5): macOS 빌드 지원 — 플랫폼 분기 + electron-builder mac 타겟 + CI 2026-04-08 15:57:16 +09:00
scripts feat(V2-5): macOS 빌드 지원 — 플랫폼 분기 + electron-builder mac 타겟 + CI 2026-04-08 15:57:16 +09:00
sidecar feat(V2-1a): Monorepo 구조 전환 — apps/desktop으로 V1 이동 2026-04-08 14:04:41 +09:00
src fix(desktop): qwen3 reasoning 모드로 LLM refine 39초 + 빈 응답 2026-04-11 09:28:55 +09:00
tests feat(V2-1a): Monorepo 구조 전환 — apps/desktop으로 V1 이동 2026-04-08 14:04:41 +09:00
electron-builder.yml feat(V2-5): macOS 빌드 지원 — 플랫폼 분기 + electron-builder mac 타겟 + CI 2026-04-08 15:57:16 +09:00
electron.vite.config.ts feat(V2-1d): packages/i18n 추출 — Electron 독립 i18n 엔진 2026-04-08 14:57:27 +09:00
package.json feat(V2-4): 데스크톱 ↔ Supabase 동기화 (push only MVP) 2026-04-09 16:28:19 +09:00
tsconfig.json feat(V2-1a): Monorepo 구조 전환 — apps/desktop으로 V1 이동 2026-04-08 14:04:41 +09:00
tsconfig.node.json feat(V2-1d): packages/i18n 추출 — Electron 독립 i18n 엔진 2026-04-08 14:57:27 +09:00
tsconfig.web.json feat(V2-1d): packages/i18n 추출 — Electron 독립 i18n 엔진 2026-04-08 14:57:27 +09:00
vitest.config.ts feat(V2-1d): packages/i18n 추출 — Electron 독립 i18n 엔진 2026-04-08 14:57:27 +09:00