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', success: 'Success',
failed: 'Failed', failed: 'Failed',
skipped: 'Skipped', skipped: 'Skipped',
running: 'Running',
pending: 'Pending',
}, },
report: { report: {
mode: 'Mode', mode: 'Mode',

View File

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

View File

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

View File

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