(req dto.AgentIDReq)
| 195 | } |
| 196 | |
| 197 | func (a AgentService) GetQQBotConfig(req dto.AgentIDReq) (*dto.AgentQQBotConfig, error) { |
| 198 | agent, install, err := a.loadAgentAndInstall(req.AgentID) |
| 199 | if err != nil { |
| 200 | return nil, err |
| 201 | } |
| 202 | if agent.AgentType == constant.AppHermesAgent { |
| 203 | return readHermesQQBotChannelConfig(path.Dir(agent.ConfigPath)) |
| 204 | } |
| 205 | conf, err := readOpenclawConfig(agent.ConfigPath) |
| 206 | if err != nil { |
| 207 | return nil, err |
| 208 | } |
| 209 | result := extractQQBotConfig(conf) |
| 210 | installed, _ := checkPluginInstalled(install.GetPath(), "qqbot") |
| 211 | result.Installed = installed |
| 212 | return &result, nil |
| 213 | } |
| 214 | |
| 215 | func (a AgentService) UpdateQQBotConfig(req dto.AgentQQBotConfigUpdateReq) error { |
| 216 | agent, install, err := a.loadAgentAndInstall(req.AgentID) |
nothing calls this directly
no test coverage detected