bugfix: 一些bug修复

This commit is contained in:
2026-05-22 17:45:58 +08:00
parent c286db68b1
commit b02f15f735
12 changed files with 115 additions and 304 deletions
+4 -1
View File
@@ -66,7 +66,10 @@ export const addQaRecord = (record: Omit<QaRecord, "time" | "timestamp">) => {
export const getQaRecords = () => {
return [...qaRecords].reverse();
};
/** 清空进程内问答记录,通常和 answerCache.clear() 一起调用 */
export const clearQaRecords = () => {
qaRecords.length = 0;
};
/** 生成 `/api/stats` 响应,实时计算 uptime 和有效缓存数量 */
export const getRuntimeStats = () => {
return {