feat(agent): add AI chat and fix dashboard 500s (#35)

* feat(agent): add AI chat panel and dashboard updates

Add ElizaOS-powered agent chat panel with streaming,
voice input, markdown rendering, and page-aware context.
Update dashboard layout with context menu and refactored
pages. Add agent memory schema, new UI components,
and fix lint errors across AI-related files.

* fix(auth): use Host header for SSO redirect URI

nextUrl.origin returns http://localhost:3000 on CF Workers,
breaking OAuth callbacks. Use Host header to derive the
correct production origin for WorkOS redirect URI.

* fix(auth): add Toaster to auth layout, fix error codes

Auth pages had no Toaster component so toast.error() calls
were invisible. Also return 401 for auth errors instead of
generic 500 from the login API.

* fix(dashboard): force-dynamic on all dashboard routes

All dashboard routes use headers() via auth, causing
static-to-dynamic runtime errors on CF Workers (500s).
Add force-dynamic to layout and server component pages.

---------

Co-authored-by: Nicholai <nicholaivogelfilms@gmail.com>
This commit is contained in:
Nicholai 2026-02-05 16:10:25 -07:00 committed by GitHub
parent a0f7852845
commit abb2ac6780
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 8 additions and 0 deletions

View File

@ -1,3 +1,5 @@
export const dynamic = "force-dynamic"
import { AppSidebar } from "@/components/app-sidebar" import { AppSidebar } from "@/components/app-sidebar"
import { SiteHeader } from "@/components/site-header" import { SiteHeader } from "@/components/site-header"
import { MobileBottomNav } from "@/components/mobile-bottom-nav" import { MobileBottomNav } from "@/components/mobile-bottom-nav"

View File

@ -1,3 +1,5 @@
export const dynamic = "force-dynamic"
import { getCloudflareContext } from "@opennextjs/cloudflare" import { getCloudflareContext } from "@opennextjs/cloudflare"
import { getDb } from "@/db" import { getDb } from "@/db"
import { projects, scheduleTasks } from "@/db/schema" import { projects, scheduleTasks } from "@/db/schema"

View File

@ -1,3 +1,5 @@
export const dynamic = "force-dynamic"
import { getCloudflareContext } from "@opennextjs/cloudflare" import { getCloudflareContext } from "@opennextjs/cloudflare"
import { getDb } from "@/db" import { getDb } from "@/db"
import { projects } from "@/db/schema" import { projects } from "@/db/schema"

View File

@ -1,3 +1,5 @@
export const dynamic = "force-dynamic"
import { getCloudflareContext } from "@opennextjs/cloudflare" import { getCloudflareContext } from "@opennextjs/cloudflare"
import { getDb } from "@/db" import { getDb } from "@/db"
import { projects } from "@/db/schema" import { projects } from "@/db/schema"