(req dto.AgentIDReq)
| 239 | } |
| 240 | |
| 241 | func (a AgentService) GetWecomConfig(req dto.AgentIDReq) (*dto.AgentWecomConfig, error) { |
| 242 | agent, install, err := a.loadAgentAndInstall(req.AgentID) |
| 243 | if err != nil { |
| 244 | return nil, err |
| 245 | } |
| 246 | if agent.AgentType == constant.AppHermesAgent { |
| 247 | return readHermesWecomChannelConfig(path.Dir(agent.ConfigPath)) |
| 248 | } |
| 249 | conf, err := readOpenclawConfig(agent.ConfigPath) |
| 250 | if err != nil { |
| 251 | return nil, err |
| 252 | } |
| 253 | result := extractWecomConfig(conf) |
| 254 | installed, _ := checkPluginInstalled(install.GetPath(), "wecom") |
| 255 | result.Installed = installed |
| 256 | return &result, nil |
| 257 | } |
| 258 | |
| 259 | func (a AgentService) UpdateWecomConfig(req dto.AgentWecomConfigUpdateReq) error { |
| 260 | agent, install, err := a.loadAgentAndInstall(req.AgentID) |
nothing calls this directly
no test coverage detected