feat: 初步新增ai助手

This commit is contained in:
meilin.huang
2026-04-15 12:47:10 +08:00
parent 13ce0e9396
commit 6f5069567e
106 changed files with 3829 additions and 539 deletions

View File

@@ -79,7 +79,7 @@ func (m *MachineScript) RunMachineScript(rc *req.Ctx) {
script := ms.Script
// 如果有脚本参数,则用脚本参数替换脚本中的模板占位符参数
if params := rc.Query("params"); params != "" {
p, err := jsonx.ToMap(params)
p, err := jsonx.ToMapByStr(params)
biz.ErrIsNil(err)
script, err = stringx.TemplateParse(ms.Script, p)
biz.ErrIsNilAppendErr(err, "failed to parse the script template parameter: %s")