feat: ship v0.9.0 with pomodoro, achievements, and injection history

Add pomodoro timer with goal notifications, writing streak milestones, and knowledge injection logging with UI previews across AI writing flows.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-07-07 19:15:52 +08:00
parent 255f1a99a0
commit d4122c8f95
53 changed files with 1679 additions and 80 deletions
+23 -1
View File
@@ -44,7 +44,12 @@ import type {
ChapterBridgeResult,
PublishStatus,
WritingStats,
KnowledgeExtractionResult
KnowledgeExtractionResult,
PomodoroState,
GoalNotificationPayload,
KnowledgeInjectionLog,
WritingAchievement,
PomodoroDuration
} from './types'
export interface ElectronAPI {
@@ -358,10 +363,25 @@ export interface ElectronAPI {
approveMerge: (bookId: string, pendingId: string) => Promise<IpcResult<KnowledgeEntry>>
saveMergeAsNew: (bookId: string, pendingId: string) => Promise<IpcResult<KnowledgeEntry>>
batchApproveHighConfidence: (bookId: string, threshold?: number) => Promise<IpcResult<number>>
listInjections: (
bookId: string,
entryId: string,
limit?: number
) => Promise<IpcResult<KnowledgeInjectionLog[]>>
}
writing: {
getStats: (bookId: string) => Promise<IpcResult<WritingStats>>
}
pomodoro: {
start: (bookId: string) => Promise<IpcResult<PomodoroState>>
pause: () => Promise<IpcResult<PomodoroState>>
resume: () => Promise<IpcResult<PomodoroState>>
cancel: () => Promise<IpcResult<PomodoroState>>
getState: () => Promise<IpcResult<PomodoroState>>
}
achievement: {
list: (bookId: string) => Promise<IpcResult<WritingAchievement[]>>
}
cockpit: {
getSummary: (bookId: string, volumeId?: string) => Promise<IpcResult<CockpitSummary>>
markSeen: (bookId: string) => Promise<IpcResult<void>>
@@ -390,6 +410,8 @@ export interface ElectronAPI {
onAiStreamChunk: (callback: (payload: AiStreamChunkEvent) => void) => () => void
onAiNetworkStatus: (callback: (payload: AiNetworkStatusEvent) => void) => () => void
onInteractiveStreamChunk: (callback: (payload: InteractiveStreamChunkEvent) => void) => () => void
onPomodoroTick: (callback: (state: PomodoroState) => void) => () => void
onGoalNotification: (callback: (payload: GoalNotificationPayload) => void) => () => void
}
declare global {