feat: ship v1.0.0 with character graph and writing analytics
Add P7 Cytoscape relationship graph with setting CRUD, P9 cockpit analytics driven by writing_sessions, chapter POV selection, and full test coverage. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -22,4 +22,19 @@ export class PomodoroDailyRepository {
|
||||
.get(date, bookId) as { completed_count: number } | undefined
|
||||
return row?.completed_count ?? 0
|
||||
}
|
||||
|
||||
getTodayStats(
|
||||
bookId: string,
|
||||
date = localDateString()
|
||||
): { completedCount: number; totalWords: number } {
|
||||
const row = this.db
|
||||
.prepare(
|
||||
'SELECT completed_count, total_words FROM pomodoro_daily WHERE date = ? AND book_id = ?'
|
||||
)
|
||||
.get(date, bookId) as { completed_count: number; total_words: number } | undefined
|
||||
return {
|
||||
completedCount: row?.completed_count ?? 0,
|
||||
totalWords: row?.total_words ?? 0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user