Spaces:
Sleeping
Sleeping
Andrew
commited on
Commit
·
1d2459b
1
Parent(s):
b6a3ce9
feat(ui): update NavMenu with persona routes and reset logic
Browse files
src/lib/components/NavMenu.svelte
CHANGED
|
@@ -28,6 +28,7 @@
|
|
| 28 |
import { usePublicConfig } from "$lib/utils/PublicConfig.svelte";
|
| 29 |
import { useAPIClient, handleResponse } from "$lib/APIClient";
|
| 30 |
import { useSettingsStore } from "$lib/stores/settings";
|
|
|
|
| 31 |
|
| 32 |
const publicConfig = usePublicConfig();
|
| 33 |
const client = useAPIClient();
|
|
@@ -54,6 +55,11 @@
|
|
| 54 |
|
| 55 |
function handleNewChatClick() {
|
| 56 |
isAborted.set(true);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 57 |
}
|
| 58 |
|
| 59 |
const dateRanges = [
|
|
@@ -184,14 +190,7 @@
|
|
| 184 |
{/if}
|
| 185 |
</button>
|
| 186 |
{/if}
|
| 187 |
-
|
| 188 |
-
<a
|
| 189 |
-
href="{base}/login"
|
| 190 |
-
class="flex h-9 w-full flex-none items-center gap-1.5 rounded-lg pl-2.5 pr-2 text-gray-500 hover:bg-gray-100 dark:text-gray-400 dark:hover:bg-gray-700"
|
| 191 |
-
>
|
| 192 |
-
Login
|
| 193 |
-
</a>
|
| 194 |
-
{/if} -->
|
| 195 |
<a
|
| 196 |
href={modelsRoute}
|
| 197 |
class="flex h-9 flex-none items-center gap-1.5 rounded-lg pl-2.5 pr-2 text-gray-500 hover:bg-gray-100 dark:text-gray-400 dark:hover:bg-gray-700"
|
|
|
|
| 28 |
import { usePublicConfig } from "$lib/utils/PublicConfig.svelte";
|
| 29 |
import { useAPIClient, handleResponse } from "$lib/APIClient";
|
| 30 |
import { useSettingsStore } from "$lib/stores/settings";
|
| 31 |
+
import { resetActivePersonasToDefaults } from "$lib/utils/personaDefaults";
|
| 32 |
|
| 33 |
const publicConfig = usePublicConfig();
|
| 34 |
const client = useAPIClient();
|
|
|
|
| 55 |
|
| 56 |
function handleNewChatClick() {
|
| 57 |
isAborted.set(true);
|
| 58 |
+
void resetActivePersonasToDefaults(
|
| 59 |
+
settings,
|
| 60 |
+
$settings.personas,
|
| 61 |
+
$settings.activePersonas
|
| 62 |
+
);
|
| 63 |
}
|
| 64 |
|
| 65 |
const dateRanges = [
|
|
|
|
| 190 |
{/if}
|
| 191 |
</button>
|
| 192 |
{/if}
|
| 193 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 194 |
<a
|
| 195 |
href={modelsRoute}
|
| 196 |
class="flex h-9 flex-none items-center gap-1.5 rounded-lg pl-2.5 pr-2 text-gray-500 hover:bg-gray-100 dark:text-gray-400 dark:hover:bg-gray-700"
|