feat: add debug dialog and related functionality for skill debugging

This commit is contained in:
mlogclub
2026-04-10 16:52:45 +08:00
parent eac3d87cc2
commit 1087ddca44
5 changed files with 491 additions and 1 deletions
+35
View File
@@ -301,6 +301,34 @@ export type UpdateSkillDefinitionPayload = CreateSkillDefinitionPayload & {
id: number
}
export type SkillDebugRunPayload = {
aiAgentId: number
conversationId?: number
skillCode: string
userMessage: string
}
export type SkillDebugRunResult = {
skillCode: string
skillName: string
replyText: string
planReason: string
skillRouteTrace: string
skillAllowedToolCodes: string[]
toolCodes: string[]
invokedToolCodes: string[]
toolSearchTrace: string
graphToolTrace: string
graphToolCode: string
interruptType: string
checkPointId: string
interrupted: boolean
traceData: string
errorMessage: string
conversationId: number
aiAgentId: number
}
export type MCPConnectionResult = {
serverCode: string
endpoint: string
@@ -881,6 +909,13 @@ export function updateSkillDefinitionPriority(ids: number[]) {
})
}
export function debugRunSkillDefinition(payload: SkillDebugRunPayload) {
return request<SkillDebugRunResult>("/api/console/skill-definition/debug_run", {
method: "POST",
body: JSON.stringify(payload),
})
}
export function testMCPConnection(serverCode: string) {
return request<MCPConnectionResult>("/api/console/mcp/test_connection", {
method: "POST",