Projects BibleWeb AI Tools Save AI response to notes
Done

Save AI response to notes

Area: AI Tools Milestone: v3

Context

Problem: The AI sometimes gives excellent answers with curated verse lists or insights. Users want to save these for future reference without manually copying and pasting into the notes system.

Solution: A one-click "Save to Notes" action on AI responses that creates a chapter-level note with the AI's response, prefixed with today's date.

Not included: Saving to a specific verse's note (the AI response isn't tied to a single verse). The note is saved as a free-form entry at bookId=0, chapter=0.

Functional

User flow:

  1. AI responds to a question
  2. User clicks "Save to Notes" on the response
  3. The response content is saved as a note with today's date prefix
  4. Visual indicator shows the message has been saved
  5. Note appears in the user's notes list at /notes

Edge cases:

  • Saved notes get bookId=0, chapter=0 (special "AI Chat" category)
  • The savedToNotes flag on the message prevents duplicate saves
  • Date prefix format: current date at the start of the note content

UX & Design

Save button: On each AI response message, a small "Save to notes" action. Saved indicator: Visual change after saving (e.g., checkmark, muted button).

Technical

Implementation (in ask/+page.svelte):

  • handleSaveToNotes(content, conversationId) calls addChapterNote(0, 0, ...)
  • Saves to bookId=0, chapter=0 as a free-form "AI Chat" note
  • Today's date prefixed to content
  • Sets savedToNotes: true on the message in chat store

Files:

  • apps/web/src/routes/(app)/ask/+page.svelte — save handler
  • apps/web/src/lib/stores/notes.svelte.tsaddChapterNote()
  • apps/web/src/lib/stores/chat.svelte.tssavedToNotes flag

Status

Current: DONE Milestone: v3 Priority: Medium — convenience feature connecting AI and notes

Dependencies:

  • Requires: AI chat (DONE), notes system (DONE)

Screenshots

Feature screenshot