Skip to content
TypeScript

Use history replace when toggling chat diff view

Julius Marmingea830cd5b1a7b
diff --git a/apps/web/src/components/ChatView.tsx b/apps/web/src/components/ChatView.tsx
index bb4fac354cf..632edc048e8 100644
--- a/apps/web/src/components/ChatView.tsx
+++ b/apps/web/src/components/ChatView.tsx
@@ -623,6 +623,7 @@ export default function ChatView({ threadId }: ChatViewProps) {
void navigate({
to: "/$threadId",
params: { threadId },
+ replace: true,
search: (previous) => {
const rest = stripDiffSearchParams(previous);
return diffOpen ? rest : { ...rest, diff: "1" };