diff --git a/frontend/src/views/SettingsView.vue b/frontend/src/views/SettingsView.vue index 422eb99..1fd2d78 100644 --- a/frontend/src/views/SettingsView.vue +++ b/frontend/src/views/SettingsView.vue @@ -4,7 +4,7 @@ import { ref, computed, watch, onMounted } from "vue"; import { useSettingsStore } from "@/stores/settings"; import { useAuthStore } from "@/stores/auth"; import { useToastStore } from "@/stores/toast"; -import { apiGet, apiPost, apiPut, apiDelete, listGroups, createGroup, deleteGroup, listGroupMembers, addGroupMember, removeGroupMember, searchUsers, getFableMcpInfo, listApiKeys, createApiKey as apiCreateApiKey, revokeApiKey as apiRevokeApiKey, getVoiceStatus, getVoiceList, synthesiseSpeech, getProfile, updateProfile, consolidateProfile, clearProfileObservations, getJournalConfig, saveJournalConfig, geocodeAddress, type ApiKeyEntry, type GroupEntry, type GroupMember, type UserSearchResult, type VoiceStatusResult, type VoiceEntry, type VoiceBlendEntry, type UserProfile, type JournalConfig } from "@/api/client"; +import { apiGet, apiPost, apiPut, apiDelete, listGroups, createGroup, deleteGroup, listGroupMembers, addGroupMember, removeGroupMember, searchUsers, getFableMcpInfo, listApiKeys, createApiKey as apiCreateApiKey, revokeApiKey as apiRevokeApiKey, getVoiceStatus, getVoiceList, synthesiseSpeech, getProfile, updateProfile, consolidateProfile, clearProfileObservations, listProfileObservations, getJournalConfig, saveJournalConfig, geocodeAddress, type ApiKeyEntry, type GroupEntry, type GroupMember, type UserSearchResult, type VoiceStatusResult, type VoiceEntry, type VoiceBlendEntry, type UserProfile, type JournalConfig, type ProfileObservationEntry } from "@/api/client"; import { usePushStore } from "@/stores/push"; import type { User } from "@/types/auth"; import PaginationBar from "@/components/PaginationBar.vue"; @@ -549,6 +549,26 @@ const profileSaving = ref(false) const profileSaved = ref(false) const consolidating = ref(false) const clearingObs = ref(false) +const observations = ref([]) +const observationsExpanded = ref(false) +const observationsLoading = ref(false) +const observationsLoaded = ref(false) + +async function toggleObservations() { + observationsExpanded.value = !observationsExpanded.value + if (observationsExpanded.value && !observationsLoaded.value) { + observationsLoading.value = true + try { + const res = await listProfileObservations() + observations.value = res.observations + observationsLoaded.value = true + } catch { + toastStore.show('Failed to load observations', 'error') + } finally { + observationsLoading.value = false + } + } +} async function loadProfile() { try { profile.value = await getProfile() } catch { /* non-critical */ } @@ -702,6 +722,8 @@ async function clearObservations() { profile.value.learned_summary = '' profile.value.observations_count = 0 profile.value.observations_updated_at = null + observations.value = [] + observationsLoaded.value = false toastStore.show('Learned data cleared') } catch { toastStore.show('Failed to clear observations', 'error') } finally { clearingObs.value = false } @@ -1929,6 +1951,23 @@ function formatUserDate(iso: string): string {
{{ profile.learned_summary }}
No learned summary yet. Observations accumulate from journal and chat conversations.
+ +
+ +
+
Loading…
+
No observations yet.
+
+
+
{{ entry.date }}
+
{{ entry.bullets }}
+
+
+
+
+