- Settings infrastructure: key-value settings table, GET/PUT API, Pinia store - Configurable assistant name (default "Fable") in settings and LLM system prompt - Model catalog with 18 models in 3 categories (General Purpose, Coding, Uncensored / Creative Writing) with download/select/remove functionality - Move Ollama status indicator from chat views to global nav bar - Chat bubble layout: user messages right-aligned, assistant left-aligned - Floating dark input bar with auto-focus and circular send button - Fix HTML entity rendering (' apostrophe issue in marked/DOMPurify pipeline) - Fix new chat button navigation (fetchConversation before router.push) - Recent chats section on home page with "New Chat" button - Update summary.md with Phase 4.5 changes Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
52 lines
1.3 KiB
Vue
52 lines
1.3 KiB
Vue
<script setup lang="ts">
|
|
import { ref, computed, onMounted, onUnmounted } from "vue";
|
|
import { useRoute } from "vue-router";
|
|
import AppHeader from "@/components/AppHeader.vue";
|
|
import ChatPanel from "@/components/ChatPanel.vue";
|
|
import ToastNotification from "@/components/ToastNotification.vue";
|
|
import { useTheme } from "@/composables/useTheme";
|
|
import { useChatStore } from "@/stores/chat";
|
|
import { useSettingsStore } from "@/stores/settings";
|
|
|
|
useTheme();
|
|
|
|
const route = useRoute();
|
|
const chatStore = useChatStore();
|
|
const settingsStore = useSettingsStore();
|
|
const chatPanelOpen = ref(false);
|
|
|
|
const contextNoteId = computed(() => {
|
|
const id = route.params.id;
|
|
if (!id) return null;
|
|
const path = route.path;
|
|
if (path.startsWith("/notes/") || path.startsWith("/tasks/")) {
|
|
return Number(id);
|
|
}
|
|
return null;
|
|
});
|
|
|
|
function toggleChatPanel() {
|
|
chatPanelOpen.value = !chatPanelOpen.value;
|
|
}
|
|
|
|
onMounted(() => {
|
|
chatStore.startStatusPolling();
|
|
settingsStore.fetchSettings();
|
|
});
|
|
|
|
onUnmounted(() => {
|
|
chatStore.stopStatusPolling();
|
|
});
|
|
</script>
|
|
|
|
<template>
|
|
<AppHeader @toggle-chat-panel="toggleChatPanel" />
|
|
<router-view />
|
|
<ChatPanel
|
|
v-if="chatPanelOpen"
|
|
:context-note-id="contextNoteId"
|
|
@close="chatPanelOpen = false"
|
|
/>
|
|
<ToastNotification />
|
|
</template>
|