From 8deaa6e4f6c2575f141a18e1f0950c193a9d32ea Mon Sep 17 00:00:00 2001 From: icarus Date: Sun, 28 Sep 2025 14:59:04 +0800 Subject: [PATCH] feat(chat-navbar): improve agent selection UI with breadcrumbs and horizontal scroll Add Breadcrumbs and HorizontalScrollContainer components to enhance agent selection UI. Remove redundant agent name display since it's now shown in the breadcrumb chip. Improve layout with better overflow handling and responsive design. --- src/renderer/src/pages/home/ChatNavbar.tsx | 39 ++++++++++++++++++---- 1 file changed, 32 insertions(+), 7 deletions(-) diff --git a/src/renderer/src/pages/home/ChatNavbar.tsx b/src/renderer/src/pages/home/ChatNavbar.tsx index 22c0887ae8..92fa43de4f 100644 --- a/src/renderer/src/pages/home/ChatNavbar.tsx +++ b/src/renderer/src/pages/home/ChatNavbar.tsx @@ -1,5 +1,6 @@ -import { cn } from '@heroui/react' +import { BreadcrumbItem, Breadcrumbs, Chip, cn } from '@heroui/react' import { NavbarHeader } from '@renderer/components/app/Navbar' +import HorizontalScrollContainer from '@renderer/components/HorizontalScrollContainer' import { HStack } from '@renderer/components/Layout' import SearchPopup from '@renderer/components/Popups/SearchPopup' import { permissionModeCards } from '@renderer/constants/permissionModes' @@ -22,6 +23,8 @@ import { AnimatePresence, motion } from 'motion/react' import { FC, ReactNode, useCallback } from 'react' import styled from 'styled-components' +import { AgentSettingsPopup } from '../settings/AgentSettings' +import { AgentLabel } from '../settings/AgentSettings/shared' import AssistantsDrawer from './components/AssistantsDrawer' import SelectAgentModelButton from './components/SelectAgentModelButton' import SelectModelButton from './components/SelectModelButton' @@ -85,7 +88,7 @@ const HeaderNavbar: FC = ({ activeAssistant, setActiveAssistant, activeTo return ( -
+
{showAssistants && ( @@ -115,10 +118,32 @@ const HeaderNavbar: FC = ({ activeAssistant, setActiveAssistant, activeTo {activeTopicOrSession === 'topic' && } {activeTopicOrSession === 'session' && agent && ( - <> - - {activeAgentId && sessionId && } - + + + AgentSettingsPopup.show({ agentId: agent.id })} + classNames={{ + base: 'self-stretch', + item: 'h-full' + }}> + + + + + + + + {activeAgentId && sessionId && ( + + + + )} + + )}
@@ -179,7 +204,7 @@ const SessionWorkspaceMeta: FC<{ agentId: string; sessionId: string }> = ({ agen
) - infoItems.push() + // infoItems.push() if (firstAccessiblePath) { infoItems.push()