Skip to content

v1.4.2

Choose a tag to compare

@WorldMargin WorldMargin released this 18 Oct 07:40

v1.4.2

修复

  • 脚本最后一句没写分号时会崩(3.0 is not a function):引擎拼的程序是「脚本 + 换行 + (typeof …) ? … : $spark_result$」,
    以 ) / ] 结尾又不写分号时会被 JS 的自动分号规则粘成 push(...)(...),而 push 返回数字。
    现在在尾巴前插了一个独立分号,模板与宏都覆盖
  • 预览里 ctx.macro.name 是空串:预览走的是只读重载,没带「宏 id → 名字」映射;现在四个预览入口都会带上

接口:挂载类改走 id 通道

  • ctx.system.mountMacro(id, target?) / unmountMacro(id, target?) 改为按宏 id(原来按名字)
  • 新增 ctx.macro.id(当前宏 id,模板段为空串)
  • 删除 ctx.macro.getAllMountedTemplate() / getAllMountedConversation(),
    改用 ctx.system.getMacro(ctx.macro.id) 拿 templates / conversations

文档

  • 使用文档:挂载示例改成 id 传参、补「最后一句不写分号也行」的说明

安装

  • 覆盖安装即可(versionCode 10700),配置与登录态都不丢