ESM 패키지 번들링 + electron-rebuild + import 수정
- electron-vite: nanoid/electron-store를 externalize 제외 (ESM 전용 번들 포함) - electron-rebuild: better-sqlite3/uiohook-napi Electron용 리빌드 - bootstrap: 동적 require → 정적 import으로 수정
This commit is contained in:
parent
f131b581a9
commit
5ccbf85a65
2 changed files with 5 additions and 7 deletions
|
|
@ -7,6 +7,7 @@ import { getHotkeyService } from './services/HotkeyService'
|
|||
import { getVoiceModeService } from './services/VoiceModeService'
|
||||
import { getLocalLLMService } from './services/LocalLLMService'
|
||||
import { getHistoryService } from './services/HistoryService'
|
||||
import { getTextInsertService } from './services/TextInsertService'
|
||||
import { initDatabase } from './db'
|
||||
import {
|
||||
createMainWindow,
|
||||
|
|
@ -168,17 +169,14 @@ async function initLLMPolling(): Promise<void> {
|
|||
// ── HistoryPopup IPC 연동 ────────────────────────────
|
||||
|
||||
function setupHistoryPopupIPC(): void {
|
||||
const { ipcMain } = require('electron')
|
||||
const { getTextInsertService } = require('./services/TextInsertService')
|
||||
|
||||
// 히스토리 팝업 열기 (핫키에서 호출)
|
||||
ipcMain.on('history:showPopup', () => {
|
||||
ipcMainRef.on('history:showPopup', () => {
|
||||
const entries = getHistoryService().list({ page: 0, pageSize: 10 }).entries
|
||||
showHistoryPopup(entries as unknown as Array<Record<string, unknown>>)
|
||||
})
|
||||
|
||||
// 아이템 선택 → 텍스트 삽입
|
||||
ipcMain.on('history:itemSelected', (_event: Electron.IpcMainEvent, data: { text: string }) => {
|
||||
ipcMainRef.on('history:itemSelected', (_event: Electron.IpcMainEvent, data: { text: string }) => {
|
||||
hideHistoryPopup()
|
||||
setTimeout(async () => {
|
||||
try {
|
||||
|
|
@ -190,7 +188,7 @@ function setupHistoryPopupIPC(): void {
|
|||
})
|
||||
|
||||
// 팝업 닫기
|
||||
ipcMain.on('history:popupDismissed', () => {
|
||||
ipcMainRef.on('history:popupDismissed', () => {
|
||||
hideHistoryPopup()
|
||||
})
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue