feat: 添加分页功能和缓存管理,优化问答记录展示

This commit is contained in:
2026-05-23 00:44:47 +08:00
parent c48d57df14
commit cc7125e681
16 changed files with 172 additions and 243 deletions
+5 -12
View File
@@ -3,10 +3,7 @@
import { RefreshCw, Trash2 } from "lucide-vue-next";
import { storeToRefs } from "pinia";
import {
Alert,
AlertDescription
} from "@/components/ui/alert";
import { Alert, AlertDescription } from "@/components/ui/alert";
import { Button } from "@/components/ui/button";
import {
Card,
@@ -39,13 +36,7 @@ const overviewItems = computed(() => [
{
label: "模型",
value: stats.value?.model || health.value?.model || "-",
detail: stats.value?.cache_enabled ? "缓存已启用" : "缓存未启用",
loading: statsLoading.value && !stats.value
},
{
label: "缓存数量",
value: stats.value?.cache_size?.toString() ?? "0",
detail: "当前进程",
detail: "AI 模型",
loading: statsLoading.value && !stats.value
},
{
@@ -59,7 +50,9 @@ const overviewItems = computed(() => [
<template>
<section class="grid gap-4">
<div class="flex flex-col gap-3 md:flex-row md:items-center md:justify-between">
<div
class="flex flex-col gap-3 md:flex-row md:items-center md:justify-between"
>
<div>
<h1 class="text-xl font-semibold text-foreground">Dashboard</h1>
<p class="mt-1 text-sm text-muted-foreground">