feat: ship v0.3.0 with P2.1 editor polish and P3 AI collaboration

Add chapter reorder, search replace, inspiration capture, and AI chat with context editing, settings, offline handling, and naming checks. Fix dev black screen by keeping process.env reads in the main process only.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-07-06 16:33:56 +08:00
parent 0b5aa146bd
commit 8ce35a1e8e
59 changed files with 3808 additions and 100 deletions
+10
View File
@@ -14,9 +14,13 @@ import { registerInspirationHandlers } from './handlers/inspiration.handler'
import { registerSnapshotHandlers } from './handlers/snapshot.handler'
import { registerBookmarkHandlers } from './handlers/bookmark.handler'
import { registerSearchHandlers } from './handlers/search.handler'
import { registerAiHandlers } from './handlers/ai.handler'
import { AiClientService } from '../services/ai-client.service'
import { NetworkMonitorService } from '../services/network-monitor.service'
let shortcutManager: ShortcutManager | null = null
let snapshotService: SnapshotService | null = null
let networkMonitor: NetworkMonitorService | null = null
export function registerIpc(): { settings: GlobalSettingsService; books: BookRegistryService; shortcuts: ShortcutManager } {
const userData = app.getPath('userData')
@@ -25,6 +29,7 @@ export function registerIpc(): { settings: GlobalSettingsService; books: BookReg
const books = new BookRegistryService(userData)
shortcutManager = new ShortcutManager(settings)
snapshotService = new SnapshotService(() => settings.get())
networkMonitor = new NetworkMonitorService()
registerSettingsHandlers(settings)
registerBookHandlers(books)
@@ -36,6 +41,7 @@ export function registerIpc(): { settings: GlobalSettingsService; books: BookReg
registerSnapshotHandlers(books, snapshotService!)
registerBookmarkHandlers(books)
registerSearchHandlers(books, settings)
registerAiHandlers(books, settings, new AiClientService(() => settings.get().aiConfig))
return { settings, books, shortcuts: shortcutManager }
}
@@ -44,6 +50,10 @@ export function getShortcutManager(): ShortcutManager | null {
return shortcutManager
}
export function getNetworkMonitor(): NetworkMonitorService | null {
return networkMonitor
}
export function getSnapshotService(): SnapshotService | null {
return snapshotService
}