(req dto.AgentIDReq)
| 289 | } |
| 290 | |
| 291 | func (a AgentService) GetDingTalkConfig(req dto.AgentIDReq) (*dto.AgentDingTalkConfig, error) { |
| 292 | agent, install, err := a.loadAgentAndInstall(req.AgentID) |
| 293 | if err != nil { |
| 294 | return nil, err |
| 295 | } |
| 296 | if agent.AgentType == constant.AppHermesAgent { |
| 297 | return readHermesDingTalkChannelConfig(path.Dir(agent.ConfigPath)) |
| 298 | } |
| 299 | conf, err := readOpenclawConfig(agent.ConfigPath) |
| 300 | if err != nil { |
| 301 | return nil, err |
| 302 | } |
| 303 | result := extractDingTalkConfig(conf) |
| 304 | installed, _ := checkPluginInstalled(install.GetPath(), "dingtalk") |
| 305 | result.Installed = installed |
| 306 | return &result, nil |
| 307 | } |
| 308 | |
| 309 | func (a AgentService) GetWeixinConfig(req dto.AgentIDReq) (*dto.AgentWeixinConfig, error) { |
| 310 | agent, _, err := a.loadAgentAndInstall(req.AgentID) |
nothing calls this directly
no test coverage detected