opencode chat backend

This commit is contained in:
2026-01-31 10:13:18 +00:00
parent b301822543
commit 925e8f2746
9 changed files with 777 additions and 0 deletions

View File

@@ -36,6 +36,8 @@ const main = async () => {
"/": withGlobal(() => new Response(`title: tnirps\ndev-mode: ${DEV}\nport: ${PORT}`)),
"/health": withGlobal(() => new Response("OK")),
"/ai/chat": withGlobalAuthed(withAuth(routes.aiChat)),
// routes that modify state require withCSRF middleware
"/auth/register": withGlobal(routes.authRegister),
"/auth/login": withGlobal(routes.authLogin),