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

Method GetWecomConfig

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

Source from the content-addressed store, hash-verified

239}
240
241func (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
259func (a AgentService) UpdateWecomConfig(req dto.AgentWecomConfigUpdateReq) error {
260 agent, install, err := a.loadAgentAndInstall(req.AgentID)

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected