feat: add Graph Tool tracing and logging support in agent run logs
This commit is contained in:
@@ -45,6 +45,7 @@ const actionOptions = [
|
||||
{ value: "rag", label: "RAG" },
|
||||
{ value: "skill", label: "Skill" },
|
||||
{ value: "tool", label: "Tool" },
|
||||
{ value: "graph", label: "Graph" },
|
||||
{ value: "handoff", label: "转人工" },
|
||||
{ value: "reply", label: "回复" },
|
||||
{ value: "fallback", label: "兜底" },
|
||||
@@ -58,6 +59,8 @@ function actionBadgeVariant(action: string) {
|
||||
return "default" as const
|
||||
case "tool":
|
||||
return "default" as const
|
||||
case "graph":
|
||||
return "default" as const
|
||||
case "rag":
|
||||
return "secondary" as const
|
||||
case "fallback":
|
||||
@@ -95,6 +98,10 @@ export default function DashboardAgentRunLogsPage() {
|
||||
() => safeParseJSON(activeLog?.toolSearchTrace ?? ""),
|
||||
[activeLog?.toolSearchTrace]
|
||||
)
|
||||
const activeGraphToolTrace = useMemo(
|
||||
() => safeParseJSON(activeLog?.graphToolTrace ?? ""),
|
||||
[activeLog?.graphToolTrace]
|
||||
)
|
||||
|
||||
const aiAgentOptions = useMemo(
|
||||
() => [
|
||||
@@ -384,6 +391,14 @@ export default function DashboardAgentRunLogsPage() {
|
||||
: activeLog.toolSearchTrace
|
||||
}
|
||||
/>
|
||||
<TextBlock
|
||||
title="Graph Tool 调用"
|
||||
value={
|
||||
activeGraphToolTrace
|
||||
? JSON.stringify(activeGraphToolTrace, null, 2)
|
||||
: activeLog.graphToolTrace
|
||||
}
|
||||
/>
|
||||
<TextBlock
|
||||
icon={<BotMessageSquareIcon className="size-4" />}
|
||||
title="用户问题"
|
||||
|
||||
@@ -367,6 +367,7 @@ export type AgentRunLog = {
|
||||
plannedSkillName: string
|
||||
skillRouteTrace: string
|
||||
toolSearchTrace: string
|
||||
graphToolTrace: string
|
||||
plannedToolCode: string
|
||||
planReason: string
|
||||
interruptType: string
|
||||
|
||||
Reference in New Issue
Block a user