Trim agent planning tools and validate strategy patches

This commit is contained in:
lky-spec
2026-04-28 15:45:47 +08:00
parent b536265f93
commit fe0dbce367
9 changed files with 566 additions and 20 deletions

View File

@@ -252,7 +252,7 @@ func allowedFieldSpecsForSkillSession(session skillSession, lang string) []llmFl
add(&out, "show_in_competition", displayCatalogFieldName("show_in_competition", lang), false)
case "strategy_management":
if session.Action == "create" || session.Action == "update_config" {
add(&out, "config_patch", "Partial StrategyConfig JSON patch inferred from the user's strategy intent. Use this for strategy requirements such as target coins, trend style, short/long bias, indicators, risk, timeframes, and prompt sections.", false)
add(&out, "config_patch", strategyConfigPatchFieldDescription(lang), false)
}
if session.Action == "update_prompt" {
add(&out, "prompt", "Full strategy prompt text to write into the strategy custom prompt.", false)
@@ -270,6 +270,10 @@ func allowedFieldSpecsForSkillSession(session skillSession, lang string) []llmFl
return out
}
func strategyConfigPatchFieldDescription(lang string) string {
return "Partial StrategyConfig JSON patch inferred from the user's strategy intent. Use this for strategy requirements such as target coins, trend style, short/long bias, indicators, risk, timeframes, and prompt sections."
}
func currentFieldValuesForSkillSession(session skillSession) map[string]string {
values := map[string]string{}
for key, value := range session.Fields {