refactor: enhance message streaming and UI components; add SWR provider

This commit is contained in:
asepharyana
2026-08-26 16:51:46 +07:00
parent 37d15456dc
commit b640079cb6
7 changed files with 110 additions and 113 deletions
@@ -0,0 +1,13 @@
"use client";
import { SWRConfig } from "swr";
import { swrConfig } from "@/lib/swr-config";
/**
* Client-side SWR provider. Lives in its own client component so the config's
* callbacks (shouldRetryOnError / onErrorRetry) never cross the server→client
* boundary from the server-rendered root layout.
*/
export function SwrProvider({ children }: { children: React.ReactNode }) {
return <SWRConfig value={swrConfig}>{children}</SWRConfig>;
}