mirror of
https://github.com/ggml-org/llama.cpp.git
synced 2026-09-19 09:15:04 +02:00
ui: fix routing nits
This commit is contained in:
committed by
GitHub
parent
89776ebfb9
commit
01d0f132fb
@@ -129,7 +129,7 @@
|
||||
|
||||
$effect(() => {
|
||||
const id = page.params.id ?? (page.route.id === '/(chat)' ? NEW_CHAT_TAB_ID : undefined);
|
||||
const prev = previousChatId;
|
||||
const prev = untrack(() => previousChatId);
|
||||
|
||||
previousChatId = id;
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
import { goto } from '$app/navigation';
|
||||
import { page } from '$app/state';
|
||||
import { SearchInput, SidebarNavigationSearchResults } from '$lib/components/app';
|
||||
import { ROUTES } from '$lib/constants';
|
||||
import { RouterService } from '$lib/services/router.service';
|
||||
import { chatStore, conversationsStore, deviceStore } from '$lib/stores';
|
||||
|
||||
@@ -20,10 +21,10 @@
|
||||
});
|
||||
|
||||
// Search page is intended for mobile; on desktop the sidebar already exposes
|
||||
// in-place search, so bounce back to a new-chat tab.
|
||||
// in-place search, so bounce back to a new-chat tab without a history entry.
|
||||
$effect(() => {
|
||||
if (browser && !deviceStore.isMobile) {
|
||||
conversationsStore.openNewChat();
|
||||
goto(ROUTES.START, { replaceState: true });
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user