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

Function prepareOpenclawInstallFiles

agent/app/service/agents_utils.go:988–998  ·  view source on GitHub ↗
(appInstall *model.AppInstall, account *model.AgentAccount, modelName, token string, allowedOrigins []string)

Source from the content-addressed store, hash-verified

986}
987
988func prepareOpenclawInstallFiles(appInstall *model.AppInstall, account *model.AgentAccount, modelName, token string, allowedOrigins []string) error {
989 if appInstall == nil {
990 return fmt.Errorf("app install is required")
991 }
992 confDir := path.Join(appInstall.GetPath(), "data", "conf")
993 if err := writeOpenclawConfig(confDir, account, modelName, token, allowedOrigins, nil); err != nil {
994 return err
995 }
996 dataDir := path.Join(appInstall.GetPath(), "data")
997 return files.NewFileOp().ChownR(dataDir, "1000", "1000", true)
998}
999
1000func buildOpenclawModelsFromAccount(account *model.AgentAccount, selectedModel string) (string, map[string]map[string]interface{}, *modelsConfig, error) {
1001 accountModels, err := loadAgentAccountModels(account)

Callers 1

CreateMethod · 0.85

Calls 3

writeOpenclawConfigFunction · 0.85
ChownRMethod · 0.80
GetPathMethod · 0.45

Tested by

no test coverage detected