Use history replace when toggling chat diff view
- Add `replace: true` to thread navigation in `ChatView` - Prevents extra browser history entries when opening/closing diff mode
This commit is contained in:
1 parent
d47059a9db
commit
a830cd5b1a
1 file changed
+1
@@ -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" };
|
||||
|
||||
Reference in new issue
Block a user