feat: 持久化 Agent 调用记录
- src/agent: 新增 AgentInvocationRepository,统一封装 Prisma 落库和本地降级存储 - src/agent/agent.service.ts: 创建 Agent 调用后写入数据库,并按项目权限过滤历史列表 - src/agent/agent.module.ts: 注册 Agent 调用记录仓储依赖
This commit is contained in:
@@ -26,8 +26,10 @@ export class AgentController {
|
||||
|
||||
@Get()
|
||||
@ApiOkResponse({ description: '查询 Agent 调用记录。' })
|
||||
listInvocations(): AgentInvocation[] {
|
||||
return this.agentService.listInvocations();
|
||||
async listInvocations(
|
||||
@CurrentUser() user: AuthenticatedUser,
|
||||
): Promise<AgentInvocation[]> {
|
||||
return this.agentService.listInvocations(user);
|
||||
}
|
||||
|
||||
@Post()
|
||||
|
||||
Reference in New Issue
Block a user