Feat: Add agent-log-list page (#9076)

### What problem does this PR solve?

Fix: Add agent-log-list page And RAPTOR:Save directly after enabling,
incomplete form submission #3221

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
chanx
2025-07-30 09:48:51 +08:00
committed by GitHub
parent 39ef2ffba9
commit 4f8e7ef763
11 changed files with 627 additions and 17 deletions

View File

@ -1,3 +1,4 @@
import { IAgentLogsRequest } from '@/interfaces/database/agent';
import api from '@/utils/api';
import { registerNextServer } from '@/utils/register-server';
import request from '@/utils/request';
@ -22,6 +23,7 @@ const {
fetchVersion,
fetchCanvas,
fetchAgentAvatar,
fetchAgentLogs,
} = api;
const methods = {
@ -101,6 +103,10 @@ const methods = {
url: fetchAgentAvatar,
method: 'get',
},
fetchAgentLogs: {
url: fetchAgentLogs,
method: 'get',
},
} as const;
const agentService = registerNextServer<keyof typeof methods>(methods);
@ -108,5 +114,11 @@ const agentService = registerNextServer<keyof typeof methods>(methods);
export const fetchTrace = (data: { canvas_id: string; message_id: string }) => {
return request.get(methods.trace.url, { params: data });
};
export const fetchAgentLogsByCanvasId = (
canvasId: string,
params: IAgentLogsRequest,
) => {
return request.get(methods.fetchAgentLogs.url(canvasId), { params: params });
};
export default agentService;