diff --git a/src/renderer/src/pages/home/ChatNavbar.tsx b/src/renderer/src/pages/home/ChatNavbar.tsx index ff80b13e43..eb639fc867 100644 --- a/src/renderer/src/pages/home/ChatNavbar.tsx +++ b/src/renderer/src/pages/home/ChatNavbar.tsx @@ -1,3 +1,4 @@ +import { cn } from '@heroui/react' import { NavbarHeader } from '@renderer/components/app/Navbar' import { HStack } from '@renderer/components/Layout' import SearchPopup from '@renderer/components/Popups/SearchPopup' @@ -152,8 +153,9 @@ const HeaderNavbar: FC = ({ activeAssistant, setActiveAssistant, activeTo } const SessionWorkspaceMeta: FC<{ agentId: string; sessionId: string }> = ({ agentId, sessionId }) => { + const { agent } = useAgent(agentId) const { session } = useSession(agentId, sessionId) - if (!session) { + if (!session || !agent) { return null } @@ -166,28 +168,25 @@ const SessionWorkspaceMeta: FC<{ agentId: string; sessionId: string }> = ({ agen const infoItems: ReactNode[] = [] - if (firstAccessiblePath) { - infoItems.push( -
- {firstAccessiblePath} -
- ) - } - - infoItems.push( + const InfoTag: FC<{ text: string; className?: string }> = ({ text, className }) => (
- {permissionModeLabel} + className={cn( + 'rounded-medium border border-default-200 px-2 py-1 text-foreground-500 text-xs dark:text-foreground-400', + className + )} + title={text}> + {text}
) + infoItems.push() + + if (firstAccessiblePath) { + infoItems.push() + } + + infoItems.push() + if (infoItems.length === 0) { return null }