+
-
+
diff --git a/ee/tabby-ui/components/user-panel.tsx b/ee/tabby-ui/components/user-panel.tsx
index bb3464cf55be..7900006decd5 100644
--- a/ee/tabby-ui/components/user-panel.tsx
+++ b/ee/tabby-ui/components/user-panel.tsx
@@ -1,4 +1,5 @@
import React from 'react'
+import { useRouter } from 'next/navigation'
import { useMe } from '@/lib/hooks/use-me'
import { useIsChatEnabled } from '@/lib/hooks/use-server-info'
@@ -16,16 +17,22 @@ import {
IconBackpack,
IconChat,
IconCode,
+ IconGear,
IconHome,
IconLogout,
IconSpinner
} from './ui/icons'
export default function UserPanel({
- children
+ children,
+ showHome = true,
+ showSetting = false
}: {
children?: React.ReactNode
+ showHome?: boolean
+ showSetting?: boolean
}) {
+ const router = useRouter()
const signOut = useSignOut()
const [{ data }] = useMe()
const user = data?.me
@@ -59,13 +66,24 @@ export default function UserPanel({
)}
{!user.name &&
{user.email}}
-
window.open('/')}
- className="cursor-pointer"
- >
-
- Home
-
+ {showHome && (
+
router.push('/')}
+ className="cursor-pointer"
+ >
+
+ Home
+
+ )}
+ {showSetting && (
+
router.push('/profile')}
+ className="cursor-pointer"
+ >
+
+ Settings
+
+ )}
{isChatEnabled && (
window.open('/playground')}