feat: 完成整体内容开发

This commit is contained in:
2026-05-22 16:27:35 +08:00
parent 5e05bf4f63
commit d3cb786edb
72 changed files with 2410 additions and 29 deletions
+9
View File
@@ -58,6 +58,15 @@ export const addQaRecord = (record: Omit<QaRecord, "time" | "timestamp">) => {
}
};
/**
* 获取最近问答记录
*
* 返回副本并按“最新在前”排序,避免 API handler 或前端展示逻辑误改内存原数组
*/
export const getQaRecords = () => {
return [...qaRecords].reverse();
};
/** 生成 `/api/stats` 响应,实时计算 uptime 和有效缓存数量 */
export const getRuntimeStats = () => {
return {