| 119 | } |
| 120 | |
| 121 | func (p *SkillPersistence) BuildRecoveryMessage(agentScope string) map[string]any { |
| 122 | text := p.BuildRecoveryAttachment(agentScope) |
| 123 | if text == nil || *text == "" { |
| 124 | return nil |
| 125 | } |
| 126 | if agentScope == "" { |
| 127 | agentScope = "main" |
| 128 | } |
| 129 | return map[string]any{ |
| 130 | "role": "user", |
| 131 | "content": []map[string]any{{"type": "text", "text": *text}}, |
| 132 | "isMeta": true, |
| 133 | "metadata": map[string]any{ |
| 134 | "source": SkillRecoverySource, |
| 135 | SkillRecoveryMetaKey: true, |
| 136 | "agent_scope": agentScope, |
| 137 | }, |
| 138 | } |
| 139 | } |
| 140 | |
| 141 | func (p *SkillPersistence) ClearForScope(agentScope string) { |
| 142 | if p == nil { |