Files
Agent-System/internal/coordinator/logging.go
T
WeiCHENandCursor f4e4357ddb fix(agent): Chat Agent 全链路 P0-P5 整改
封堵鉴权旁路与导出 IDOR,DocGov 改服务端身份;对话层 PendingAction 接真实 docgov/taskrun;修复流式租约假死与会话级任务流;加固配置/doc_id/NULL;补齐 slog 与测试;前端 ErrorBoundary 与受控文档重试。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-13 02:50:22 +00:00

23 lines
503 B
Go

package coordinator
import (
"context"
"log/slog"
"chat-agent-system/internal/intent"
)
func logRouteDecision(ctx context.Context, recRes *intent.IntentRecognitionResult, decision RouteDecision) {
if recRes == nil || recRes.TopIntent == nil {
return
}
top := recRes.TopIntent
slog.InfoContext(ctx, "coordinator_route",
"intent", string(top.Intent),
"branch", string(recRes.Branch),
"confidence", top.Confidence,
"channel", string(decision.Channel),
"reason", decision.Reason,
)
}