* 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. --------- Co-authored-by: Nicholai <nicholaivogelfilms@gmail.com>
24 lines
554 B
TypeScript
Executable File
24 lines
554 B
TypeScript
Executable File
"use client"
|
|
|
|
import { useEffect } from "react"
|
|
import type { LucideIcon } from "lucide-react"
|
|
import { usePageActionsContext } from "@/components/page-actions-provider"
|
|
|
|
interface PageAction {
|
|
readonly id: string
|
|
readonly label: string
|
|
readonly icon?: LucideIcon
|
|
readonly onSelect: () => void
|
|
}
|
|
|
|
export function useRegisterPageActions(
|
|
actions: ReadonlyArray<PageAction>
|
|
): void {
|
|
const { register } = usePageActionsContext()
|
|
|
|
useEffect(() => {
|
|
if (actions.length === 0) return
|
|
return register(actions)
|
|
}, [actions, register])
|
|
}
|