feat: add debug dialog and related functionality for skill debugging
This commit is contained in:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user