From 68920ab5f1e78bfb7f319a703d200d3b133708a3 Mon Sep 17 00:00:00 2001 From: Nate Kelley Date: Thu, 25 Sep 2025 16:08:04 -0600 Subject: [PATCH 1/2] create link out --- apps/web/src/components/features/chat/threeDotMenuHooks.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/web/src/components/features/chat/threeDotMenuHooks.tsx b/apps/web/src/components/features/chat/threeDotMenuHooks.tsx index e8d6e032d..ea47599af 100644 --- a/apps/web/src/components/features/chat/threeDotMenuHooks.tsx +++ b/apps/web/src/components/features/chat/threeDotMenuHooks.tsx @@ -97,6 +97,7 @@ export const useOpenInNewTabSelectMenu = ({ chatId = '' }: { chatId: string | un link: { to: '/app/chats/$chatId', params: { chatId: chatId }, + target: '_blank', }, }); }, []); From 0a0cabec8ddd02f5d21817b7ee3ad3ac1fae1da7 Mon Sep 17 00:00:00 2001 From: Nate Kelley Date: Thu, 25 Sep 2025 16:12:10 -0600 Subject: [PATCH 2/2] new tab button --- .../features/chat/threeDotMenuHooks.tsx | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/apps/web/src/components/features/chat/threeDotMenuHooks.tsx b/apps/web/src/components/features/chat/threeDotMenuHooks.tsx index ea47599af..12930f463 100644 --- a/apps/web/src/components/features/chat/threeDotMenuHooks.tsx +++ b/apps/web/src/components/features/chat/threeDotMenuHooks.tsx @@ -1,4 +1,4 @@ -import { useNavigate } from '@tanstack/react-router'; +import { useNavigate, useRouter } from '@tanstack/react-router'; import { useMemo } from 'react'; import type { IBusterChat } from '@/api/asset_interfaces'; import { useDeleteChat, useDuplicateChat, useGetChat } from '@/api/buster_rest/chats'; @@ -89,18 +89,23 @@ export const useFavoriteChatSelectMenu = ({ chatId = '' }: { chatId: string | un }; export const useOpenInNewTabSelectMenu = ({ chatId = '' }: { chatId: string | undefined }) => { + const router = useRouter(); return useMemo(() => { return createDropdownItem({ label: 'Open in new tab', value: 'open-in-new-tab', icon: , - link: { - to: '/app/chats/$chatId', - params: { chatId: chatId }, - target: '_blank', + onClick: () => { + if (chatId) { + const link = router.buildLocation({ + to: '/app/chats/$chatId', + params: { chatId: chatId }, + }); + window.open(link.href, '_blank'); + } }, }); - }, []); + }, [chatId, router.buildLocation]); }; export const useDuplicateChatSelectMenu = ({ chatId = '' }: { chatId: string | undefined }) => {