feat: off the record mode (OTR)

Adds a third input mode toggle alongside Note and Agent. When active:
- Textarea gets a subtle purple tint with dashed border
- OTR button highlights purple
- Placeholder reads "Off the record — not logged or distilled…"
- off_record=True is sent to /chat; session_logger is skipped
- In-memory session context is preserved within the session

Switching to Note or Agent mode deactivates OTR, and vice versa.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Scott Idem
2026-03-26 21:07:21 -04:00
parent b3f40cf437
commit fa04b5e6b0
4 changed files with 53 additions and 1 deletions

View File

@@ -23,6 +23,7 @@ class ChatRequest(BaseModel):
include_long: bool = True
include_mid: bool = True
include_short: bool = True
off_record: bool = False # skip session log (in-memory context preserved)
user: str = "scott"
persona: str = "inara"
@@ -92,7 +93,8 @@ async def _stream_chat(req: ChatRequest):
response_text, actual_backend = task.result()
history.append({"role": "assistant", "content": response_text})
save_session(session_id, history)
log_turn(session_id, req.message, response_text)
if not req.off_record:
log_turn(session_id, req.message, response_text)
requested = req.model or settings.primary_backend
payload = {