Wrap DiffPanel in DiffWorkerPoolProvider in _chat.tsx layout

DiffPanel uses FileDiff and Virtualizer from @pierre/diffs/react, which
require a WorkerPoolContextProvider ancestor. The DiffWorkerPoolProvider
wrapper was missing in the new _chat.tsx layout, causing a runtime crash
when the diff panel opened.
This commit is contained in:
Cursor Agent committed 2026-02-19 06:32:57 +00:00
1 parent 5817848a17
commit 470cabc110
1 file changed
+6 -2
+6 -2
View File
@@ -1,6 +1,6 @@
import { Outlet, createFileRoute } from "@tanstack/react-router";
import DiffPanel from "../components/DiffPanel";
import DiffPanel, { DiffWorkerPoolProvider } from "../components/DiffPanel";
import Sidebar from "../components/Sidebar";
import { useStore } from "../store";
@@ -11,7 +11,11 @@ function ChatRouteLayout() {
<div className="flex h-screen overflow-hidden bg-background text-foreground isolate">
<Sidebar />
<Outlet />
{state.diffOpen && <DiffPanel />}
{state.diffOpen && (
<DiffWorkerPoolProvider>
<DiffPanel />
</DiffWorkerPoolProvider>
)}
</div>
);
}