feat(memory): batch 3 — Grafana dashboard + 3 Low fixes + issues cleanup

This commit is contained in:
matevip 2026-04-21 15:28:21 +08:00
parent e42444f50a
commit 6ae221b38d
4 changed files with 13 additions and 6 deletions

View File

@ -1805,6 +1805,8 @@ export default {
success: 'Success',
failed: 'Failed',
skipped: 'Skipped',
running: 'Running',
pending: 'Pending',
},
report: {
mode: 'Mode',

View File

@ -1815,6 +1815,8 @@ export default {
success: '成功',
failed: '失败',
skipped: '跳过',
running: '运行中',
pending: '等待中',
},
report: {
mode: '模式',

View File

@ -51,8 +51,10 @@ export const useMemoryStore = defineStore('memory', () => {
try {
const res = await http.get(`/memory/${agentId}/dream/reports/${reportId}`)
currentReport.value = res.data
} catch {
error.value = null
} catch (e: any) {
currentReport.value = null
error.value = e.message || 'Failed to load report'
} finally {
loading.value = false
}

View File

@ -18,7 +18,7 @@
</template>
<script setup lang="ts">
import { ref, onMounted } from 'vue'
import { ref, watch } from 'vue'
import { useI18n } from 'vue-i18n'
import { http } from '@/api'
@ -26,12 +26,13 @@ const props = defineProps<{ agentId: number }>()
const { t } = useI18n()
const card = ref<any>(null)
onMounted(async () => {
watch(() => props.agentId, async (id) => {
if (!id) { card.value = null; return }
try {
const res = await http.get(`/memory/${props.agentId}/dream/morning-card`)
const res = await http.get(`/memory/${id}/dream/morning-card`)
card.value = res.data
} catch { /* silent */ }
})
} catch { card.value = null }
}, { immediate: true })
async function dismiss() {
if (!card.value) return