feat(backthink): 后台思考面板并入已存记录——不再只读WS实时事件
后台思考页此前只读 /ws/chat 的 backthink/thinking WS 实时事件(后台任务完成才有),DB里 270 条 backthink_records 看不到。新增 adminBackthink() 拉 GET /api/v1/admin/backthink + useAutoReload(10s),与 WS 事件按 id 去重、按 at 倒序展示;空态/数据源说明更新。 验收: npm run build 99模块全绿
This commit is contained in:
1 parent
db8465f68b
commit
0a645b7212
2 files changed
+24
-7
No files matched your search
@@ -14,6 +14,7 @@ import type {
|
||||
ApiErrorShape,
|
||||
ApiKeyIssueResult,
|
||||
AuditRecord,
|
||||
BackthinkItem,
|
||||
AutomationCreateResult,
|
||||
AutomationRunResult,
|
||||
ChannelTestResult,
|
||||
@@ -683,3 +684,8 @@ export function adminObservabilityAudit(limit?: number): Promise<AuditRecord[]>
|
||||
function limitQuery(limit?: number): string {
|
||||
return limit && limit > 0 ? `?limit=${limit}` : "";
|
||||
}
|
||||
|
||||
/** GET /api/v1/admin/backthink — persisted background-think records (newest first). */
|
||||
export function adminBackthink(limit?: number): Promise<BackthinkItem[]> {
|
||||
return request<BackthinkItem[]>(`/admin/backthink${limitQuery(limit)}`);
|
||||
}
|
||||
Reference in new issue
Block a user