mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2026-11-07 00:05:14 +00:00
* fix(ai): persist model verification settings and reset lifecycle status * fix(ai): reset model verification before upgrade cutover
20 lines
703 B
Go
20 lines
703 B
Go
package service
|
|
|
|
import (
|
|
"github.com/1Panel-dev/1Panel/agent/app/dto/request"
|
|
"github.com/1Panel-dev/1Panel/agent/app/model"
|
|
"github.com/1Panel-dev/1Panel/agent/app/task"
|
|
)
|
|
|
|
func (a AppService) InstallForMCP(req request.AppInstallCreate, executeScript bool) (*model.AppInstall, error) {
|
|
return a.InstallWithHooks(req, executeScript, &AppInstallHooks{PrepareSiteDir: prepareMCPInstallSiteDirectory})
|
|
}
|
|
|
|
func prepareMCPInstallSiteDirectory(app model.App, detail model.AppDetail, req request.AppInstallCreate, _ *task.Task) error {
|
|
if !managesOpenrestySiteDirectory(app, detail) {
|
|
return nil
|
|
}
|
|
directory, _ := req.Params["WEBSITE_DIR"].(string)
|
|
return ensureCurrentWebsiteDirectory(directory)
|
|
}
|