Current title:
- -{currentTitle}
-New title would be:
- -{newTitle}
-| Messages | |
|---|---|
|
|
-
+
{conv.name || 'Untitled conversation'}
|
diff --git a/tools/ui/src/lib/components/app/navigation/SidebarNavigation/SidebarNavigation.svelte b/tools/ui/src/lib/components/app/navigation/SidebarNavigation/SidebarNavigation.svelte
index a23f4682e5..b5e4beeffd 100644
--- a/tools/ui/src/lib/components/app/navigation/SidebarNavigation/SidebarNavigation.svelte
+++ b/tools/ui/src/lib/components/app/navigation/SidebarNavigation/SidebarNavigation.svelte
@@ -4,15 +4,22 @@
import { PanelLeftClose, PanelLeftOpen, X } from '@lucide/svelte';
import {
ActionIcon,
+ DialogConversationRename,
Logo,
SidebarNavigationConversationList,
SidebarNavigationActions
} from '$lib/components/app';
import { ROUTES } from '$lib/constants';
import { fade } from 'svelte/transition';
+ import { SvelteSet } from 'svelte/reactivity';
+ import { useMarqueeSelection } from '$lib/hooks/use-marquee-selection.svelte';
import { useKeyboardShortcuts } from '$lib/hooks/use-keyboard-shortcuts.svelte';
- import { conversationsStore, conversations } from '$lib/stores/conversations.svelte';
+ import {
+ buildConversationTree,
+ conversationsStore,
+ conversations
+ } from '$lib/stores/conversations.svelte';
import { chatStore } from '$lib/stores/chat.svelte';
import { config } from '$lib/stores/settings.svelte';
import { RouterService } from '$lib/services/router.service';
@@ -40,7 +47,6 @@
const isOnMobile = $derived(isMobile.current);
const alwaysShowOnDesktop = $derived(config().alwaysShowSidebarOnDesktop as boolean);
- // Keep the sidebar expanded on desktop when the user pins it open
$effect(() => {
if (alwaysShowOnDesktop && !isOnMobile) {
isExpandedMode = true;
@@ -58,13 +64,11 @@
if (!isExpandedMode) {
isSearchModeActive = false;
searchQuery = '';
+ if (isSelectionMode) exitSelectionMode();
cancelMobileCollapse();
}
});
- // On mobile the dedicated /search route hides the sidebar (see the aside
- // render guard below). Collapse it as we enter /search so it doesn't
- // reappear expanded when the user navigates back via the back button.
$effect(() => {
if (isMobile.current && page.url.hash.includes(ROUTES.SEARCH)) {
isExpandedMode = false;
@@ -89,6 +93,121 @@
return conversations();
});
+ let isSelectionMode = $state(false);
+ let selectedIds = new SvelteSet