(appInstall *model.AppInstall, account *model.AgentAccount, modelName, token string, allowedOrigins []string)
| 986 | } |
| 987 | |
| 988 | func 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 | |
| 1000 | func buildOpenclawModelsFromAccount(account *model.AgentAccount, selectedModel string) (string, map[string]map[string]interface{}, *modelsConfig, error) { |
| 1001 | accountModels, err := loadAgentAccountModels(account) |
no test coverage detected