While suggestions are on, typos are no longer replaced silently. The popup shows
the fix next to the candidate and applies it only when the candidate is accepted.
The per-minute request cap rises from 6 to 20 so suggestions keep appearing after
accepting one and continuing to type.
Typo auto-correct (INPUT-19)
- TypoCorrectionService + core typo-correction: 2-set Korean layout
mistypes both ways, always-wrong spellings, near-misses of the user's
frequent words, optional model check re-validated in core; applied by
backspace N + paste and cancelled on new keys or window change.
Prediction quality (INPUT-20/21)
- gemma models are sent raw with the user's unfinished sentence pre-filled
into the model turn, so the model truly continues the text (mid-word
joins and spacing exact). Other models keep the instruction prompt.
- Context: text before the caret (opening lines and a fact list of names,
dates, amounts outside the 400-char window), messages just sent in the
same chat window (memory only, 30 min), personal-graph follow-ups and
IDF-ranked related sentences with Korean stemming.
- Guards: first sentence only, restated-prefix stripping (also fixes the
instruction path), repeat drop, no invented dates/names/numbers
(one retry), plain -다 register, no emoji unless the user uses them,
search-box keywords. Fill loop mixes instruction prompts for variety.
- Opt-in real-model probe: tests/integration/suggestion-quality.ollama.test.ts
Suggestions now actually show up
- Terminal (Claude Code): caret trust from the input line, not the whole
screen (status line below the box blocked every keystroke); Korean
composition counts as typing at the end; a grey placeholder filling the
empty box at once is not user text.
- Chrome: UIA focus flicker while typing no longer resets "edited".
- KakaoTalk/RichEdit: trailing paragraph mark ignored for edit position
and stripped so accepted text keeps its separating space.
- While the overlay is visible the suggestion shortcuts are captured so
Ctrl+Alt+Enter no longer also types a newline; released when hidden.
- nut-js preloaded after boot (first accept waited 4.8 s).
Several desktop paths quietly substituted defaults or partial results: a
config write could fall back to a throwaway in-memory store, speech provider
errors were absorbed into empty transcriptions, and meeting exports built
file names from raw titles.
Writes now fail explicitly when the store is unavailable, provider and model
failures reach the UI as errors, and export names pass through one
sanitizer. Settings, license, ad, and support surfaces use the shared theme
tokens, unused hotkey helpers are gone, and the package gains strict
node/renderer typecheck configs plus red-team e2e scenarios for these flows.
증상:
- STT 전사는 정상 ('그럼 이제는 되는 건가요?')
- 로그상 'Text inserted (14 chars, 851ms)' 성공으로 보임
- 그런데 실제로 활성 앱에 텍스트가 안 들어감
원인:
- TextInsertService._insertViaClipboard가 nut.Key.LeftControl + V로 하드코딩
- macOS는 Cmd+V (LeftSuper+V)가 표준 paste 단축키
- Ctrl+V는 macOS에서 동작 안 함 (앱마다 다르지만 보통 noop)
- 클립보드 검증 로직도 거짓 양성:
- paste 후 clipboard.readText() === text면 '정상'으로 판단
- macOS에서는 Ctrl+V가 클립보드를 안 건드리므로 항상 일치 → 항상 'success' 로그
수정:
- pasteModKey = process.platform === 'darwin' ? LeftSuper : LeftControl
- pressKey/releaseKey 시 동적 modifier 사용
- releaseKey는 V → mod 순으로 release (modifier last 권장)
- 잘못된 검증 로직 제거 (의미 없는 로그였음)
- macOS는 paste 후 sleep 250ms (Win/Linux 150ms) — 일부 앱의 비동기 처리 여유
- clipboard write 후 20ms 짧은 지연 추가 (앱이 클립보드 변화 인식 시간)
- npm workspaces 루트 (apps/*, packages/*) 세팅
- V1 전체를 apps/desktop/으로 git mv (src, resources, tests, sidecar,
scripts, electron.vite.config.ts, electron-builder.yml, vitest.config.ts,
tsconfig.node.json, tsconfig.web.json)
- apps/desktop/package.json 신규 (name=@d3ro/desktop)
- productName: 'd3ro-voice' 명시 — app.getName()을 고정하여 userData 경로
%APPDATA%\d3ro-voice\ 그대로 유지 (기존 DB/설정 연속성 보장)
- 루트 package.json을 workspace 루트로 재구성, 공통 devDep만 유지
(typescript, eslint, prettier)
- turbo.json, tsconfig.base.json 추가 (Turborepo 자체 설치는 별도 sub-phase)
- memory/project_status.md 생성 (규칙 13)
검증:
- npm run typecheck 통과
- npm run build 통과 (electron-vite main+preload+renderer)
- npm run dev 실제 실행 → DB/핫키/Ollama 자동 실행 모두 정상
2026-04-08 14:04:41 +09:00
Renamed from src/main/services/TextInsertService.ts (Browse further)