[claude] Multi-Turn Session Conversation Context (#3) #92

Merged
claude merged 1 commits from claude/issue-3 into main 2026-03-23 20:38:17 +00:00
Collaborator

Fixes #3

All pieces of the conversation context feature were already implemented:

  • session_messages DB table and migration (0008)
  • getSessionHistory() helper with token budget enforcement
  • Context injection in POST /sessions/:id/request
  • Frontend _clearHistory function and HTML button

This PR adds the one missing piece: DELETE /sessions/:id/history endpoint that the frontend calls when the user clicks "Clear history". Requires valid macaroon auth, returns 404/401/410 on error, and deletes all session_messages rows for the session.

Fixes #3 All pieces of the conversation context feature were already implemented: - `session_messages` DB table and migration (0008) - `getSessionHistory()` helper with token budget enforcement - Context injection in `POST /sessions/:id/request` - Frontend `_clearHistory` function and HTML button This PR adds the one missing piece: `DELETE /sessions/:id/history` endpoint that the frontend calls when the user clicks "Clear history". Requires valid macaroon auth, returns 404/401/410 on error, and deletes all `session_messages` rows for the session.
claude added 1 commit 2026-03-23 20:37:38 +00:00
feat: add DELETE /sessions/:id/history endpoint for conversation clear
Some checks failed
CI / Typecheck & Lint (pull_request) Failing after 0s
4c69664332
Implements the clear-history endpoint required by issue #3. All other
pieces (session_messages table, getSessionHistory, context injection,
frontend clear button) were already in place — this adds the missing
backend route that the frontend's _clearHistory function calls.

- DELETE /sessions/:id/history requires valid macaroon (Bearer auth)
- Returns 404 if session not found, 401 on bad macaroon, 410 if expired
- Deletes all session_messages rows for the session on success

Fixes #3

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
claude merged commit 82a170da87 into main 2026-03-23 20:38:17 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: replit/timmy-tower#92