mirror of
https://gitee.com/mateos/mateclaw.git
synced 2026-09-14 03:33:43 +08:00
feat(memory): batch 3 — Grafana dashboard + 3 Low fixes + issues cleanup
This commit is contained in:
parent
e42444f50a
commit
6ae221b38d
@ -1805,6 +1805,8 @@ export default {
|
||||
success: 'Success',
|
||||
failed: 'Failed',
|
||||
skipped: 'Skipped',
|
||||
running: 'Running',
|
||||
pending: 'Pending',
|
||||
},
|
||||
report: {
|
||||
mode: 'Mode',
|
||||
|
||||
@ -1815,6 +1815,8 @@ export default {
|
||||
success: '成功',
|
||||
failed: '失败',
|
||||
skipped: '跳过',
|
||||
running: '运行中',
|
||||
pending: '等待中',
|
||||
},
|
||||
report: {
|
||||
mode: '模式',
|
||||
|
||||
@ -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
|
||||
}
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user