| author | |
| committer | |
| log | a33cc8c75874bf89050ae90c58c5b6227debd4e2 |
| tree | 72df57bc37a63f3b58b8b12cc779e25643b1b5c9 |
| parent | a01d712751f8103001b5e728d64c12bc7c3d652a |
| signature | Signed by PGP key B5690EEEBB952194 |
3 files changed, 5 insertions(+), 7 deletions(-)
apps/web/src/components/ChatView.tsx+1-1| ... | @@ -1003,7 +1003,7 @@ export default function ChatView({ threadId }: ChatViewProps) { | ... | @@ -1003,7 +1003,7 @@ export default function ChatView({ threadId }: ChatViewProps) { |
| 1003 | replace: true, | 1003 | replace: true, |
| 1004 | search: (previous) => { | 1004 | search: (previous) => { |
| 1005 | const rest = stripDiffSearchParams(previous); | 1005 | const rest = stripDiffSearchParams(previous); |
| 1006 | return diffOpen ? rest : { ...rest, diff: "1" }; | 1006 | return diffOpen ? { ...rest, diff: undefined } : { ...rest, diff: "1" }; |
| 1007 | }, | 1007 | }, |
| 1008 | }); | 1008 | }); |
| 1009 | }, [diffOpen, navigate, threadId]); | 1009 | }, [diffOpen, navigate, threadId]); |
apps/web/src/diffRouteSearch.ts+3-3| ... | @@ -1,9 +1,9 @@ | ... | @@ -1,9 +1,9 @@ |
| 1 | import { TurnId } from "@t3tools/contracts"; | 1 | import { TurnId } from "@t3tools/contracts"; |
| 2 | 2 | ||
| 3 | export interface DiffRouteSearch { | 3 | export interface DiffRouteSearch { |
| 4 | diff?: "1"; | 4 | diff?: "1" | undefined; |
| 5 | diffTurnId?: TurnId; | 5 | diffTurnId?: TurnId | undefined; |
| 6 | diffFilePath?: string; | 6 | diffFilePath?: string | undefined; |
| 7 | } | 7 | } |
| 8 | 8 | ||
| 9 | function isDiffOpenValue(value: unknown): boolean { | 9 | function isDiffOpenValue(value: unknown): boolean { |
apps/web/src/routes/_chat.$threadId.tsx+1-3| ... | @@ -170,9 +170,7 @@ function ChatThreadRouteView() { | ... | @@ -170,9 +170,7 @@ function ChatThreadRouteView() { |
| 170 | void navigate({ | 170 | void navigate({ |
| 171 | to: "/$threadId", | 171 | to: "/$threadId", |
| 172 | params: { threadId }, | 172 | params: { threadId }, |
| 173 | search: (previous) => { | 173 | search: { diff: undefined }, |
| 174 | return stripDiffSearchParams(previous); | ||
| 175 | }, | ||
| 176 | }); | 174 | }); |
| 177 | }, [navigate, threadId]); | 175 | }, [navigate, threadId]); |
| 178 | const openDiff = useCallback(() => { | 176 | const openDiff = useCallback(() => { |