diff --git a/tools/ui/src/lib/components/app/navigation/SidebarNavigation/SidebarNavigationConversationItem.svelte b/tools/ui/src/lib/components/app/navigation/SidebarNavigation/SidebarNavigationConversationItem.svelte
index 2c1b9adf21..b1c2b78f65 100644
--- a/tools/ui/src/lib/components/app/navigation/SidebarNavigation/SidebarNavigationConversationItem.svelte
+++ b/tools/ui/src/lib/components/app/navigation/SidebarNavigation/SidebarNavigationConversationItem.svelte
@@ -39,6 +39,7 @@
depth = 0
}: Props = $props();
+ let renderActionsDropdown = $state(false);
let dropdownOpen = $state(false);
let isLoading = $derived(getAllLoadingChats().includes(conversation.id));
@@ -70,10 +71,26 @@
}
}
+ function handleMouseLeave() {
+ if (!dropdownOpen) {
+ renderActionsDropdown = false;
+ }
+ }
+
+ function handleMouseOver() {
+ renderActionsDropdown = true;
+ }
+
function handleSelect() {
onSelect?.(conversation.id);
}
+ $effect(() => {
+ if (!dropdownOpen) {
+ renderActionsDropdown = false;
+ }
+ });
+
onMount(() => {
document.addEventListener('edit-active-conversation', handleGlobalEditEvent as EventListener);
@@ -86,19 +103,23 @@
});
-
-
-
{
- e.stopPropagation();
- handleTogglePin();
- }
- },
- {
- icon: Pencil,
- label: 'Edit',
- onclick: handleEdit,
- shortcut: ['shift', 'cmd', 'e']
- },
- {
- icon: Download,
- label: 'Export',
- onclick: (e: Event) => {
- e.stopPropagation();
- conversationsStore.downloadConversation(conversation.id);
+ {#if renderActionsDropdown}
+
+ {
+ e.stopPropagation();
+ handleTogglePin();
+ }
},
- shortcut: ['shift', 'cmd', 's']
- },
- {
- icon: Trash2,
- label: 'Delete',
- onclick: handleDelete,
- variant: 'destructive',
- shortcut: ['shift', 'cmd', 'd'],
- separator: true
- }
- ]}
- />
-
-
+ {
+ icon: Pencil,
+ label: 'Edit',
+ onclick: handleEdit,
+ shortcut: ['shift', 'cmd', 'e']
+ },
+ {
+ icon: Download,
+ label: 'Export',
+ onclick: (e: Event) => {
+ e.stopPropagation();
+ conversationsStore.downloadConversation(conversation.id);
+ },
+ shortcut: ['shift', 'cmd', 's']
+ },
+ {
+ icon: Trash2,
+ label: 'Delete',
+ onclick: handleDelete,
+ variant: 'destructive',
+ shortcut: ['shift', 'cmd', 'd'],
+ separator: true
+ }
+ ]}
+ />
+