6ee4087a29
- Centralize `useAgents` and `useModels` state within the Nuxt app context to prevent data leaks and improve initialization. - Migrate virtualization from `vue-virtual-scroller` to `@tanstack/vue-virtual` with new `RowVirtualizerFixed` and `RowVirtualizerDynamic` components. - Upgrade Nuxt to v4.3.1 and remove `@vue-macros/nuxt`. - Replace `big.js` with an optimized custom `lshDecimal` string manipulation logic for pricing calculations in the provider API. - Implement automatic focus redirection in `ChatInput` to capture standard keyboard input. - Refactor Sidenav and Settings components to utilize virtualization for long lists (topics, agents, models). - Enhance theme colors and mobile experience. More work to come on both of these.
35 lines
1.0 KiB
Vue
35 lines
1.0 KiB
Vue
<script setup lang="ts">
|
|
import SettingsDialog from '~/components/Settings/Dialog.vue';
|
|
|
|
const { open: sidebarOpen, openSidebar } = useSidebar();
|
|
const { colorScheme } = useTheme();
|
|
|
|
useHead({
|
|
htmlAttrs: {
|
|
class: colorScheme.class
|
|
}
|
|
});
|
|
|
|
useKeyboardShortcuts();
|
|
</script>
|
|
|
|
<template>
|
|
<Sidenav />
|
|
<main
|
|
class="bg-[var(--bg-surface)] flex flex-col h-full w-full border border-solid border-[var(--color-border)] rounded-lg overflow-hidden">
|
|
<div class="h-14 flex items-center justify-between px-4">
|
|
<div class="flex items-center gap-2">
|
|
<button v-if="!sidebarOpen" @click="openSidebar"
|
|
class="flex p-2 rounded-lg text-[var(--text-primary)] bg-transparent hover:bg-[var(--color-hover)] transition-colors">
|
|
<Icon class="text-5" name="mynaui:panel-left-open" />
|
|
</button>
|
|
</div>
|
|
</div>
|
|
<div class="flex-1 overflow-y-auto">
|
|
<slot />
|
|
</div>
|
|
</main>
|
|
<SettingsDialog />
|
|
<Dropdown />
|
|
</template>
|