Skip to content

feat(ask): persistent conversations, history & per-brief follow-ups - #6

Merged
8tp merged 1 commit into
mainfrom
feat/conversation-brief-history
Jun 23, 2026
Merged

feat(ask): persistent conversations, history & per-brief follow-ups#6
8tp merged 1 commit into
mainfrom
feat/conversation-brief-history

Conversation

@8tp

@8tp 8tp commented Jun 23, 2026

Copy link
Copy Markdown
Owner

Makes Ask AI a persistent assistant and surfaces brief history with follow-ups — the sixth item from the batch.

Backend

  • Migration 009 + queries/conversations.ts: conversations + conversation_messages tables. A thread can be anchored to a daily brief.
  • /ask persists each exchange, weaves prior turns + the anchored brief into the prompt for follow-ups, and returns the thread id via the X-Conversation-Id header.
  • New routes: GET/DELETE /api/conversations[/:id]; GET /api/insights/briefings — recent briefs including prior regenerations (old versions kept).

Frontend

  • Ask is now a persistent thread with a slide-in History drawer (reopen / continue / delete past chats) and a New chat button.
  • "Discuss" on the daily brief opens Ask anchored to that brief; a banner shows "Following up on your brief."
  • The brief panel gets a past-briefs browser — view any earlier brief (incl. regenerations) and discuss it. Old briefs are retained on regenerate.

Verification

Backend endpoints verified over HTTP (conversations persist with messages + anchor date; brief history keeps both regenerations). typecheck + lint + 20 tests + web build green. Full AI round-trip verified on deploy (CLI lives on the box).

🤖 Generated with Claude Code

Ask AI is now a real assistant with memory, and daily briefs are browsable.

Backend:
- migration 009 + queries/conversations.ts: conversations + messages tables
  (a thread may be anchored to a brief). briefings.byId/listRecent.
- /ask persists each exchange to a conversation, weaves prior turns + the
  anchored brief into the prompt for follow-ups, and returns the thread id via
  the X-Conversation-Id header.
- New routes: GET/DELETE /conversations[/:id]; GET /insights/briefings (recent
  briefs, INCLUDING prior regenerations so old versions are kept).

Frontend:
- AskClaude: persistent thread, a slide-in History drawer (reopen/continue/
  delete past chats), New-chat, and "Following up on your <date> brief" when
  opened from a brief.
- InsightsPanel: a "Discuss" button (opens Ask anchored to the shown brief) and
  a past-briefs browser — view any earlier brief (incl. regenerations) and
  discuss it.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@8tp
8tp merged commit 2c4f337 into main Jun 23, 2026
2 checks passed
@8tp
8tp deleted the feat/conversation-brief-history branch June 23, 2026 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant