feat: chat overview

This commit is contained in:
Timothy J. Baek
2024-09-17 22:05:19 +02:00
parent bb087a5989
commit d1dbb9a3be
14 changed files with 364 additions and 79 deletions
+3 -4
View File
@@ -8,7 +8,7 @@
mobile,
settings,
showArchivedChats,
showSettings,
showControls,
showSidebar,
user
} from '$lib/stores';
@@ -22,6 +22,7 @@
import UserMenu from './Sidebar/UserMenu.svelte';
import MenuLines from '../icons/MenuLines.svelte';
import AdjustmentsHorizontal from '../icons/AdjustmentsHorizontal.svelte';
import Map from '../icons/Map.svelte';
const i18n = getContext('i18n');
@@ -31,9 +32,7 @@
export let chat;
export let selectedModels;
export let showModelSelector = true;
export let showControls = false;
let showShareChatModal = false;
let showDownloadChatModal = false;
@@ -110,7 +109,7 @@
<button
class=" flex cursor-pointer px-2 py-2 rounded-xl hover:bg-gray-50 dark:hover:bg-gray-850 transition"
on:click={() => {
showControls = !showControls;
showControls.set(!$showControls);
}}
aria-label="Controls"
>
+4 -3
View File
@@ -8,7 +8,7 @@
import { downloadChatAsPDF } from '$lib/apis/utils';
import { copyToClipboard } from '$lib/utils';
import { showSettings } from '$lib/stores';
import { showOverview, showControls } from '$lib/stores';
import { flyAndScale } from '$lib/utils/transitions';
import Dropdown from '$lib/components/common/Dropdown.svelte';
@@ -128,8 +128,9 @@
<DropdownMenu.Item
class="flex gap-2 items-center px-3 py-2 text-sm cursor-pointer hover:bg-gray-50 dark:hover:bg-gray-800 rounded-md"
id="chat-overview-button"
on:click={() => {
shareHandler();
on:click={async () => {
await showControls.set(true);
await showOverview.set(true);
}}
>
<Map className=" size-4" strokeWidth="1.5" />