refactor: remove AgentRunLog related code and components

- Deleted AgentRunLogResponse struct from skill_response.go.
- Removed agent_run_log_repository.go and agent_run_log_service.go files.
- Eliminated AgentRunLogDetailDialog component and its related logic from the dashboard.
- Removed agent run log fetching functions from admin API.
- Updated navigation and localization files to remove references to agent run logs.
This commit is contained in:
mlogclub
2026-06-23 23:22:18 +08:00
parent 1440c3c4c3
commit 6122a1d881
23 changed files with 126 additions and 2026 deletions
+1 -56
View File
@@ -4,11 +4,9 @@ import (
"testing"
"time"
applicationruntime "agent-desk/internal/ai/application/runtime"
"agent-desk/internal/models"
"agent-desk/internal/pkg/enums"
"agent-desk/internal/pkg/toolx"
applicationruntime "agent-desk/internal/ai/application/runtime"
)
func TestReplyEligibilityCanReply(t *testing.T) {
@@ -70,59 +68,6 @@ func TestResolveReplyTimeout(t *testing.T) {
}
}
func TestBuildRunLogPlan(t *testing.T) {
summary := &applicationruntime.Summary{
PlannedSkillID: 44,
PlanReason: "manual",
}
action, toolCode, reason := buildRunLogPlan(summary)
if action != "skill" || toolCode != "" || reason != "manual" {
t.Fatalf("unexpected skill plan result: action=%q toolCode=%q reason=%q", action, toolCode, reason)
}
summary = &applicationruntime.Summary{
Interrupted: true,
TraceData: `{
"graphTools": {
"items": [
{
"toolCode": "` + toolx.GraphTriageServiceRequest.Code + `",
"recommendedAction": "create_ticket",
"ticketDraftReady": true
}
]
}
}`,
}
action, toolCode, reason = buildRunLogPlan(summary)
if action != "graph" || toolCode != toolx.GraphTriageServiceRequest.Code || reason == "" {
t.Fatalf("unexpected graph interrupt result: action=%q toolCode=%q reason=%q", action, toolCode, reason)
}
summary = &applicationruntime.Summary{
InvokedToolCodes: []string{toolx.BuiltinToolSearch.Code},
TraceData: `{
"toolSearch": {
"items": [
{
"targetToolCode": "mcp/test/search"
}
]
}
}`,
}
action, toolCode, reason = buildRunLogPlan(summary)
if action != "tool" || toolCode != "mcp/test/search" || reason != "agent invoked dynamic tool via tool_search" {
t.Fatalf("unexpected dynamic tool result: action=%q toolCode=%q reason=%q", action, toolCode, reason)
}
summary = &applicationruntime.Summary{ReplyText: "done"}
action, toolCode, reason = buildRunLogPlan(summary)
if action != "reply" || toolCode != "" || reason != "agent replied directly" {
t.Fatalf("unexpected reply result: action=%q toolCode=%q reason=%q", action, toolCode, reason)
}
}
func TestResolveInterruptPrompt(t *testing.T) {
summary := &applicationruntime.Summary{
Interrupts: []applicationruntime.InterruptContextSummary{