Phase 3 구현: 텍스트 삽입 + RecordingTip/ResultPopup + Settings

- TextInsertService: clipboard save→set→Ctrl+V→restore (@nut-tree-fork/nut-js)
- RecordingTip 팝업: 9개 웨이브바 cos분포, thinking 점근수렴, 2-phase 리사이즈
- ResultPopup 팝업: 복사 버튼, auto-close, 마우스 호버 유지, 다크모드
- WindowManager: 팝업 프리로딩, 커서 위치 표시, 멀티모니터 보정
- Settings 모달: General/Audio/STT/LLM 탭
- VoiceModeService: 전사 완료 시 자동 텍스트 삽입 + 팝업 연동
- electron-vite: 팝업 HTML 멀티 엔트리 + popup preload 빌드
This commit is contained in:
Yun Chan 2026-04-05 02:11:58 +09:00
parent 1d152d01a1
commit 517210af2f
16 changed files with 1366 additions and 10 deletions

View file

@ -12,6 +12,7 @@ import type { TranscriptionResult } from './LocalSTTService'
import { getHotkeyService } from './HotkeyService'
import type { HotkeyConfig } from './HotkeyService'
import { configGet } from './ConfigService'
import { getTextInsertService } from './TextInsertService'
import { D3ROError, ErrorCode } from '@shared/errors'
import { TIMING } from '@shared/constants'
import { RecognitionState, AudioState } from '@shared/types'
@ -421,7 +422,7 @@ class VoiceModeService extends EventEmitter {
// ── 세션 완료/취소 ─────────────────────────────────────
private _completeSession(finalText: string): void {
private async _completeSession(finalText: string): Promise<void> {
if (!this._session) return
this._setRecognitionState(RecognitionState.COMPLETED)
@ -430,6 +431,16 @@ class VoiceModeService extends EventEmitter {
const session = { ...this._session }
logger.info(`Session completed: "${finalText.substring(0, 50)}${finalText.length > 50 ? '...' : ''}"`)
// 텍스트 삽입 (autoInsert 설정 확인)
if (configGet('autoInsert') && finalText.length > 0) {
try {
const insertMethod = configGet('insertMethod')
await getTextInsertService().insertText(finalText, insertMethod)
} catch (error) {
logger.warn(`Text insert failed: ${error instanceof Error ? error.message : String(error)}`)
}
}
this.emit('session-completed', { session, finalText })
// IDLE로 복귀