feat: implement buildResumeTargets function and update resume handling logic

This commit is contained in:
mlogclub
2026-04-14 18:27:45 +08:00
parent e4cec52661
commit 1766eadcf1
6 changed files with 66 additions and 8 deletions
@@ -28,6 +28,24 @@ func buildResumeDataMessage(resumeData map[string]string) *schema.Message {
return schema.UserMessage(string(data))
}
func buildResumeTargets(resumeData map[string]string) map[string]any {
if len(resumeData) == 0 {
return nil
}
targets := make(map[string]any, len(resumeData))
for key, value := range resumeData {
key = strings.TrimSpace(key)
if key == "" {
continue
}
targets[key] = value
}
if len(targets) == 0 {
return nil
}
return targets
}
func buildRunOptions(checkPointID string) []adk.AgentRunOption {
options := make([]adk.AgentRunOption, 0, 1)
if strings.TrimSpace(checkPointID) != "" {