Add edit/delete history, named sessions, scroll fix, systemd service

- Edit/delete individual messages from session context with inline editing
  (Ctrl+Enter saves, Escape cancels); changes sync to backend via PUT /history
- PUT /history/{session_id} endpoint to replace full message list
- Named sessions: readable slugs (e.g. quiet-spring) instead of UUID fragments
- Scroll no longer snaps to bottom when user has scrolled up to read history
- cortex.service: systemd unit for auto-start and restart-on-failure

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Scott Idem
2026-03-10 23:38:39 -04:00
parent 2f675ee4bf
commit 8add4ffd02
4 changed files with 366 additions and 15 deletions

20
cortex/cortex.service Normal file
View File

@@ -0,0 +1,20 @@
[Unit]
Description=Cortex / Inara LLM Gateway
After=network.target
[Service]
Type=simple
User=scott
WorkingDirectory=/home/scott/agents_sync/projects/Cortex_and_Inara_dev/cortex
ExecStart=/home/scott/agents_sync/projects/Cortex_and_Inara_dev/cortex/.venv/bin/uvicorn main:app --host 0.0.0.0 --port 8000
Restart=on-failure
RestartSec=5
# Pass through the user's environment so API keys in ~/.env or shell env are available
EnvironmentFile=-/home/scott/agents_sync/projects/Cortex_and_Inara_dev/cortex/.env
# Give LLM subprocesses time to finish before force-kill
TimeoutStopSec=15
[Install]
WantedBy=multi-user.target