refactor: standardize code comments

This commit is contained in:
tinkle-community
2025-12-08 01:40:48 +08:00
parent 0636ced476
commit a12c0ae8c9
103 changed files with 5466 additions and 5468 deletions

View File

@@ -5,9 +5,9 @@ import (
"testing"
)
// TestBuildSystemPrompt_ContainsAllValidActions 测试 prompt 是否包含所有有效的 action
// TestBuildSystemPrompt_ContainsAllValidActions tests whether prompt contains all valid actions
func TestBuildSystemPrompt_ContainsAllValidActions(t *testing.T) {
// 这是系统中定义的所有有效 action来自 validateDecision
// These are all valid actions defined in the system (from validateDecision)
validActions := []string{
"open_long",
"open_short",
@@ -17,13 +17,13 @@ func TestBuildSystemPrompt_ContainsAllValidActions(t *testing.T) {
"wait",
}
// 构建 prompt
// Build prompt
prompt := buildSystemPrompt(1000.0, 10, 5, "default", "")
// 验证每个有效 action 都在 prompt 中出现
// Verify each valid action appears in prompt
for _, action := range validActions {
if !strings.Contains(prompt, action) {
t.Errorf("Prompt 缺少有效的 action: %s", action)
t.Errorf("Prompt missing valid action: %s", action)
}
}
}