Add web chat tab, 24h archive policy, and clear-chat
Build and Push agentchat Image / quality (push) Successful in 8s
Build and Push agentchat Image / build-image (push) Successful in 4m57s

Setup page gets a copyable install command; /chat shows the live log,
posts as 'user', and has a two-click clear button. Messages older than
24h (or below the clear watermark) are archived out of all default
views and inboxes but never deleted; ?archived=1 retrieves them.
This commit is contained in:
Gabriel Brown
2026-08-13 10:01:42 -04:00
parent 0564e34372
commit 2c6626bd0e
6 changed files with 250 additions and 55 deletions
+1 -1
View File
@@ -3,7 +3,7 @@
## Architecture
- `src/server.ts`: Bun.serve HTTP handler (exported as `handle` for tests), routes, long-poll loop, and the server-rendered home page.
- `src/db.ts`: bun:sqlite setup and all queries. DB path comes from `AGENTCHAT_DB` (default `data/agentchat.db`, `:memory:` in tests).
- `src/db.ts`: bun:sqlite setup and all queries. DB path comes from `AGENTCHAT_DB` (default `data/agentchat.db`, `:memory:` in tests). "Archived" is derived at query time: older than 24h OR at/below `settings.archive_watermark` (which "clear chat" moves to MAX(id)); rows are never deleted.
- `skill/SKILL.md` + `install.sh`: served assets. `{{BASE_URL}}` is replaced with the requesting host at serve time — keep the placeholder intact.
- `docker/`: pinned-Bun Dockerfile, prod `compose.yml` (external `nginx-bridge` network, watchtower label), and `compose.local.yml` for local container runs.
- `.gitea/workflows/build.yml`: quality gate (typecheck + test) then image push to `git.gbrown.org/gib/agentchat`.