Skip to content

Commit d0ae675

Browse files
committed
chore: 更新连续决策引擎和测试文件
- 在连续决策引擎中引入 json-iterator 库以优化 JSON 处理。 - 清理测试文件中的多余空行,确保代码整洁。 - 修复测试用例中的格式问题,提升可读性。
1 parent fec13f2 commit d0ae675

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

internal/core/continuous_decision_engine.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@ package core
22

33
import (
44
"context"
5-
"encoding/json"
65
"fmt"
76
"log/slog"
87
"strings"
98
"time"
109

10+
json "github.com/json-iterator/go"
11+
1112
"github.com/m4n5ter/another-me/internal/core/types"
1213
. "github.com/m4n5ter/another-me/pkg/option"
1314
)

internal/core/tests/agent_dispatcher_test.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,6 @@ func TestAgentLoadBalancing(t *testing.T) {
128128

129129
agent1.On("Execute", mock.Anything, mock.Anything, mock.Anything).
130130
Return(expectedResult, nil).Once()
131-
132131
agent2.On("Execute", mock.Anything, mock.Anything, mock.Anything).
133132
Return(expectedResult, nil).Once()
134133

@@ -142,7 +141,7 @@ func TestAgentLoadBalancing(t *testing.T) {
142141
}
143142

144143
task2 := types.Task{
145-
ID: "load-balance-task-2",
144+
ID: "load-balance-task-2",
146145
Type: "gui_click",
147146
AgentType: types.AgentTypeGUI,
148147
CreatedAt: time.Now(),
@@ -282,4 +281,4 @@ func TestSpecializedAgentSelection(t *testing.T) {
282281
sysOpsAgent.AssertExpectations(t)
283282
socialAgent.AssertExpectations(t)
284283
financeAgent.AssertExpectations(t)
285-
}
284+
}

0 commit comments

Comments
 (0)