Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions agent/app/service/agents_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,10 @@ func buildAgentItem(agent *model.Agent, appInstall *model.AppInstall, envMap map
return item
}

func isAgentAppKey(appKey string) bool {
return appKey == constant.AppOpenclaw || appKey == constant.AppCopaw || appKey == constant.AppHermesAgent
}

func isOpenclawLegacyHTTPVersion(version string) bool {
return !common.CompareAppVersion(version, openclawHTTPSVersion)
}
Expand Down
2 changes: 1 addition & 1 deletion agent/app/service/app_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ func deleteAppInstall(deleteReq request.AppInstallDelete) error {
return err
}
appKey := install.App.Key
if appKey == constant.AppOpenclaw || appKey == constant.AppCopaw {
if isAgentAppKey(appKey) {
_ = agentRepo.DeleteByAppInstallIDWithCtx(ctx, install.ID)
}

Expand Down
11 changes: 11 additions & 0 deletions agent/app/service/website.go
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,17 @@ func (w WebsiteService) CreateWebsite(create request.WebsiteCreate) (err error)
req request.AppInstallCreate
install *model.AppInstall
)
appDetail, err := appDetailRepo.GetFirst(repo.WithByID(create.AppInstall.AppDetailId))
if err != nil {
return err
}
app, err := appRepo.GetFirst(repo.WithByID(appDetail.AppId))
if err != nil {
return err
}
if isAgentAppKey(app.Key) {
return fmt.Errorf("%s does not support website deployment", app.Key)
}
req.Name = create.AppInstall.Name
req.AppDetailId = create.AppInstall.AppDetailId
req.Params = create.AppInstall.Params
Expand Down
8 changes: 6 additions & 2 deletions frontend/src/views/website/website/create/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
:key="index"
:label="app.name"
:value="app.id"
:disabled="app.key == 'openclaw'"
:disabled="isRestrictedDeploymentApp(app.key)"
></el-option>
</el-select>
</el-form-item>
Expand Down Expand Up @@ -694,6 +694,10 @@ const getProxyTargetFromApp = (app: Pick<App.AppInstalled, 'httpPort' | 'httpsPo
};
};

const isRestrictedDeploymentApp = (appKey?: string) => {
return appKey === 'openclaw' || appKey === 'copaw' || appKey === 'hermes-agent';
};

const changeInstall = () => {
appInstalls.value.forEach((app) => {
if (app.id === website.value.appInstallId) {
Expand All @@ -708,7 +712,7 @@ const searchAppList = () => {
searchApp(appReq).then((res) => {
apps.value = res.data.items;

const selectableApp = res.data.items.find((item) => item.key !== 'openclaw');
const selectableApp = res.data.items.find((item) => !isRestrictedDeploymentApp(item.key));
if (selectableApp) {
website.value.appinstall.appId = selectableApp.id;
website.value.appinstall.appkey = selectableApp.key;
Expand Down
Loading