From 2b25bb29431d3278269a182caf26cd1df643f223 Mon Sep 17 00:00:00 2001 From: bracesproul Date: Wed, 15 Jan 2025 15:11:10 -0800 Subject: [PATCH] fix: Improve sidebar --- .../components/add-agent-inbox-dialog.tsx | 17 ++- src/components/app-sidebar/index.tsx | 104 +++++++++--------- 2 files changed, 66 insertions(+), 55 deletions(-) diff --git a/src/components/agent-inbox/components/add-agent-inbox-dialog.tsx b/src/components/agent-inbox/components/add-agent-inbox-dialog.tsx index f6f0de1..212c140 100644 --- a/src/components/agent-inbox/components/add-agent-inbox-dialog.tsx +++ b/src/components/agent-inbox/components/add-agent-inbox-dialog.tsx @@ -131,9 +131,13 @@ export function AddAgentInboxDialog({ +

+ This is the ID of the graph (can be the graph name), or assistant + to fetch threads from, and invoke when actions are taken. +

Deployment URL * +

+ This is the URL of your LangGraph deployment. Can be a local, or + production deployment. +

Name +

+ Optional name for the inbox. Used in the sidebar. +

setName(e.target.value)} @@ -169,7 +180,7 @@ export function AddAgentInboxDialog({

This value is stored in your browser's local storage and diff --git a/src/components/app-sidebar/index.tsx b/src/components/app-sidebar/index.tsx index a63d496..b4d75bd 100644 --- a/src/components/app-sidebar/index.tsx +++ b/src/components/app-sidebar/index.tsx @@ -21,6 +21,12 @@ import { useThreadsContext } from "../agent-inbox/contexts/ThreadContext"; import { prettifyText } from "../agent-inbox/utils"; import { cn } from "@/lib/utils"; import { AGENT_INBOX_GITHUB_README_URL } from "../agent-inbox/constants"; +import { + Tooltip, + TooltipContent, + TooltipProvider, + TooltipTrigger, +} from "../ui/tooltip"; const gradients = [ "linear-gradient(to right, #FF416C, #FF4B2B)", // Red-Orange @@ -76,60 +82,54 @@ export function AppSidebar() { return ( - changeAgentInbox(item.id, true)} + + + + changeAgentInbox(item.id, true)} + > +

+ {label.slice(0, 1).toUpperCase()} +
+ + {label} + + + + {label} + + + { + e.stopPropagation(); + deleteAgentInbox(item.id); + }} > -
- {label.slice(0, 1).toUpperCase()} -
- - {label} - - - {/* TODO: This is a button nested inside a button. This is bad and should be fixed. */} - { - e.stopPropagation(); - deleteAgentInbox(item.id); - }} - > - - - - {/* TODO: Implement editing inboxes */} - {/* { - e.stopPropagation(); - push(`/edit`); - }} - variant="link" - > - - */} - - + +
); })}