MCPcopy Create free account
hub / github.com/1Panel-dev/1Panel / GetQQBotConfig

Method GetQQBotConfig

agent/app/service/agents_channels.go:197–213  ·  view source on GitHub ↗
(req dto.AgentIDReq)

Source from the content-addressed store, hash-verified

195}
196
197func (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
215func (a AgentService) UpdateQQBotConfig(req dto.AgentQQBotConfigUpdateReq) error {
216 agent, install, err := a.loadAgentAndInstall(req.AgentID)

Callers

nothing calls this directly

Calls 6

loadAgentAndInstallMethod · 0.95
readOpenclawConfigFunction · 0.85
extractQQBotConfigFunction · 0.85
checkPluginInstalledFunction · 0.85
GetPathMethod · 0.45

Tested by

no test coverage detected