feat: ship v0.6.0 with cockpit, knowledge base, and chapter bridge
Deliver P5 writer workflow: writing cockpit, manual knowledge CRUD with review, chapter bridge with optional AI, publish status, and stock buffer reminders. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
import type { SqliteDb } from '../types'
|
||||
|
||||
export class BridgeDismissRepository {
|
||||
constructor(private db: SqliteDb) {}
|
||||
|
||||
isDismissed(chapterId: string): boolean {
|
||||
const row = this.db
|
||||
.prepare('SELECT chapter_id FROM chapter_bridge_dismiss WHERE chapter_id = ?')
|
||||
.get(chapterId)
|
||||
return Boolean(row)
|
||||
}
|
||||
|
||||
dismiss(chapterId: string): void {
|
||||
this.db
|
||||
.prepare(
|
||||
`INSERT INTO chapter_bridge_dismiss (chapter_id) VALUES (?)
|
||||
ON CONFLICT(chapter_id) DO UPDATE SET dismissed_at = datetime('now')`
|
||||
)
|
||||
.run(chapterId)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user