Commands/Dictionary 미연결 버그 4건 수정

1. CommandsPage: handleSave/handleDelete에 실제 IPC 호출 연결
   - instruction:create/update/delete 호출 추가
   - 프리셋은 삭제 불가 (isBuiltin 체크)

2. Preload: instruction API 추가 (getAll/create/update/delete/reorder)
   - 기존에 preload 브릿지가 없어서 렌더러에서 호출 불가했음

3. Dictionary → STT initialPrompt 주입
   - VoiceModeService._transcribe에서 DictionaryService.getPromptHints() 호출
   - 사용자 사전 단어를 Whisper initialPrompt로 전달

4. DictionaryPage: 편집 기능 추가
   - 각 항목에 Edit 버튼 추가
   - Add/Edit 공용 다이얼로그 (editId로 분기)
This commit is contained in:
Yun Chan 2026-04-05 12:45:45 +09:00
parent 6e9e8b1f29
commit 5596a52dcb
4 changed files with 185 additions and 44 deletions

View file

@ -418,8 +418,18 @@ class VoiceModeService extends EventEmitter {
const stt = getLocalSTTService()
const language = configGet('sttLanguage')
// Dictionary → STT initialPrompt 주입 (Speakly 패턴)
let initialPrompt: string | undefined
try {
const { getDictionaryService } = await import('./DictionaryService')
initialPrompt = getDictionaryService().getPromptHints() || undefined
} catch {
// DictionaryService 미초기화 시 무시
}
const result: TranscriptionResult = await stt.transcribe(merged, {
language: language === 'auto' ? undefined : language
language: language === 'auto' ? undefined : language,
initialPrompt,
})
if (this._isInTerminalState()) return