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

Function loadOpenclawAgentByID

agent/app/service/agents_utils.go:40–49  ·  view source on GitHub ↗
(agentID uint)

Source from the content-addressed store, hash-verified

38}
39
40func loadOpenclawAgentByID(agentID uint) (*model.Agent, error) {
41 agent, err := agentRepo.GetFirst(repo.WithByID(agentID))
42 if err != nil {
43 return nil, err
44 }
45 if agent.AgentType != constant.AppOpenclaw {
46 return nil, fmt.Errorf("%s does not support", agent.AgentType)
47 }
48 return agent, nil
49}
50
51func ensureContainerRunning(containerName string) error {
52 status, err := checkContainerStatus(containerName)

Callers 2

ResetTokenMethod · 0.85
GetRoleMarkdownFilesMethod · 0.85

Calls 2

GetFirstMethod · 0.65
WithByIDMethod · 0.65

Tested by

no test coverage detected