(agentID uint)
| 1491 | } |
| 1492 | |
| 1493 | func (a AgentService) loadOpenclawAgentConfig(agentID uint) (*model.Agent, *model.AppInstall, map[string]interface{}, error) { |
| 1494 | agent, install, conf, err := a.loadAgentConfig(agentID) |
| 1495 | if err != nil { |
| 1496 | return nil, nil, nil, err |
| 1497 | } |
| 1498 | if agent.AgentType != constant.AppOpenclaw { |
| 1499 | return nil, nil, nil, fmt.Errorf("%s does not support", agent.AgentType) |
| 1500 | } |
| 1501 | return agent, install, conf, nil |
| 1502 | } |
| 1503 | |
| 1504 | func (a AgentService) mutateAgentConfig(agentID uint, fn func(agent *model.Agent, install *model.AppInstall, conf map[string]interface{}) error) error { |
| 1505 | agent, install, conf, err := a.loadAgentConfig(agentID) |
no test coverage detected