tiny-engine/packages/plugins/ai
yz-yu 9a12bf3c2f
AI plugins (#418)
* init project

Match-id-61778b743a9dc8d8df471dcb285fb229931648a6

* fix: fix build error (#1)

* fix: fix build error

* fix: fix server dependence

* fix: add logo and fix readme (#5)

* update readme (#6)

* fix: add logo and fix readme

* fix: update readme

* feat: add pnpm to project

* fix(bundle): fix env variable can not be bundle (#16)

* docs: add pr and bug template (#18)

* fix(bindEvents): fix bind Events can not delete (#22)

* feat: 修复当画布没有内容时控制台报错 (#26)

* fix:按钮组数据编辑后显示出错 (#24)

* fix:走马灯属性配置清空标签页后添加标签页显示出错 (#23)

* fix:走马灯属性配置清空标签页后添加标签页显示出错

* fix: 优化走马灯删除标签页问题修复方案

* fix(design-core): build error with monaco-editor (#57)

* fix(page-lock):页面解锁按钮图标修复 (#43)

* fix: 修复无页面时页面内容显示错误问题 (#31)

* fix: 修复不切换页面点击页面设置时表单校验错误问题 (#32)

* fix(block-list-icon):区块管理面板去掉列表图标 (#33)

* fix:区块管理面板去掉列表图标

* fix(block-list-icon):区块管理面板去掉列表图标

* feat(docs): add Milestones (#46)

* feat(chore): update package info (#53)

* feat(chore): update package info

* feat(docs-package): add homepage url

* fix(toolbars): disable toolbar btn when page is empty (#70)

* fix(toolbars): disable toolbar btn when page is empty

* fix(toolbar): disable preview when page is empty

* feat(doc): add doc link to readme (#54)

* fix(style): adjust style detail (#67)

* fix(canvas): change canvas menu item hiding to disabed (#75)

* fix(canvas): fix del key error when nothing is selected (#69)

* feat(chore): add setup script setup environment before serving (#80)

* fix(pluginMaterial): fix block list can't scroll when visible in canvas (#77)

* feat: 页面输入输出配置,配置内有内容时,按钮替换为展示部分文案内容。 (#66)

* feat: 页面输入输出配置,配置内有内容时,按钮替换为展示部分文案内容。

* feat: 方法名修改更加符合语义

* fix:修复属性面板-插槽开关切换schema不正确 (#85)

* fix:时间线步骤条编辑数据,步骤条会消失 (#84)

* fix: 时间线步骤条编辑data,时间线会消失

* Revert "fix: 时间线步骤条编辑data,时间线会消失"

This reverts commit b24f8ba60d.

* fix:时间线步骤条编辑数据,时间线会消失

* fix(pagePlugin): 删除文件夹添加节流,避免多次出现无法删除弹窗 (#74)

* fix(pagePlugin): 删除文件夹添加防抖,避免多次出现无法删除弹窗

* fix(pagePlugin): use throttle by review comment

* fix:loading can't be closed when state is saved (#87)

* fix:loading can't be closed when state is saved

* fix: remove global loading

* fix(metaComponent): fix #79 metaListItems dragging not working (#86)

* fix(pagePlugin): clear some state when delte current page (#72)

* fix(pagePlugin): clear some state when delte current page

* fix(pagePlugin): del unnecessary optional chaining operator

* fix(chore): add code readablity

* fix(chore): optimize code by review comment

* fix: 数据源面板中,点击新建字段报错 (#37)

* fix:修复组件属性绑定工具类函数,出码预览未定义 (#90)

* fix(insert-footer-button):设计器页面设置-输入设置中,保存取消按钮顺序错误,格式化按钮样式错误,应与UI保持一直;大纲书导航中,眼睛图标,建议改为睁开就是可见,闭眼就是不可见;提示框样式修改 (#94)

* fix(insert-footer-button):
设计器页面设置-输入设置中,保存取消按钮顺序错误,格式化按钮样式错误,应与UI保持一致;
大纲树导航中,眼睛图标,建议改为睁开就是可见,闭眼就是不可见;
提示框样式修改

* fix(styles-import): 解决tree组件选中样式背景色为黑色的问题 (#102)

* feat(builtin): builtinComponent 组件独立包抽离 (#52)

* feat(builtin): builtinComponent 组件独立包抽离

* 添加eslint&自动化构建 (#101)

* fix:组件属性绑定工具类utils,修改预览出码实现 (#93)

* fix: 修复空页面执行右键删除和右键复制时控制台报错的问题 (#103)

* fix: 修复空页面执行右键删除和右键复制时控制台报错的问题

* fix: 修复空页面执行右建操作时控制台报错的问题

* refactor: 简化operations空判断代码

* fix: verify operations copy  id

* fix: verify operations copy  id

* fix: verify operations copy  id

* fix: copyNode function verify  params

* fix: 不可操作的菜单项disabled

* fix: 点击disabled菜单项 不关闭菜单

* fix:修复自定义属性新增功能 (#108)

* fix:修复自定义属性新增功能

* fix: 修复MetaHtmlText组件控制台警告

* fix:调整透传Attributes警告解决方案

* fix:调整透传Attributes警告解决方案

* fix:调整透传Attributes警告解决方案

* fix(canvasShortCutPanel): add click event to quick insert component in… (#81)

* fix(canvasShotCutPanel): add click event to quick insert component in shortcutpanel

* fix(canvasShortPanel): add deepclone utils

* feat(utils): add deepClone method

* feat(unit-test): add unit test for deepclone function

* fix: code check (#112)

* fix: code check (#117)

* fix: 变量修改后保存页面,再次修改变量失败 (#110)

* fix:修复国际化参数配置 (#106)

* feat(style): stylePanel add style selector, write css to global styles (#41)

* feat(style): stylePanel add style selector, write css to global styles

* feat(style): classNameSelector support edit and delete

* fix(build): fix setting-style plugin build error

* fix(chore): fix review comment

* fix: 修复DSL出码报错 (#139)

* fix(plugin-script): js plugin code format when save (#138)

* fix: 手动更新画布key导致表格渲染出错 (#129)

* fix(dataSources): 解决collection添加表格时预览报错 #118 (#151)

* feat(block2webcomponent): add block2webcomponent package (#146)

* feat(block2webcomponent): add block2webcomponent package

* fix(build): fix build config uncorrect

* fix(build): change cdn link to npmmirror

* fix:删除lowcodeWrap多余参数 (#119)

* fix(chore): replace unpkg with npmmirror (#149)

* fix(chore): replace unpkg with npmmirror

* fix(dev): dev environment use node_moduels

* fix(chore): sync version

* fix(preview): use npmmirror link

* fix(preview): devtoolapi use unpkg link

* fix(preview): import map add esm cdn

* fix(version): fix tiny-vue version

* fix(version): fix tiny-vue version

* fix(version): fix tiny-vue version

* fix(blockBuild): change packageName to block build (#160)

* fix: 画布中右键弹框,修复添加父级-弹出框功能 (#60)

* fix: 画布中右键弹框,修复添加父级-弹出框功能

* fix: schema缺少children

* fix: 按检视意见修改

* fix: 修复画布宽度设置问题 (#128)

* fix: 修复画布宽度设置问题

* fix: 修复复制静态文件时接口报错 (#175)

* feat:引入第三方组件库element-plus部分组件示例 (#105)

* feat: 引入第三方组件库element-plus示例

* fix:修复格式错误

* feat:表格列配置组件

* feat:增加表格列配置组件

* fix:build error

* fix:修复scheme2code接口报错

* fix:修改import顺序

* fix: 使用import动态导入有cdn的工具类 (#133)

* fix: 使用import动态导入有cdn的工具类

* fix(preview): upgrade vue repl version (#170)

* fix(preview): upgrade vue repl version

* fix(preview): optimized by review comment

* fix:添加style变量赋值 (#154)

* fix: 修复unpkg依赖 (#188)

* fix: 修复unpkg依赖

* fix:固定opentiny/vue的次版本号

* fix:升级devtools-api版本

* fix:CDN域名提取环境变量

* fix:升级opentiny/vue版本

* fix:修改主题样式文件版本

* fix:修复codeCheck

* feat:设计器增加帮助文档说明 (#100)

* fix: 修复多个全局变量下载代码出错 (#197)

* fix: 修复多个全局变量下载代码出错

* fix: 精简应用发布时commit消息的校验规则 (#205)

* feat: 开放区块管理相关功能 (#206)

* feat: add materials script (#195)

增加拆分物料与构建物料脚本

* doc:README添加物料同步脚本说明 (#207)

* feat(generate-vue): change generate vue code location (#201)

* feat(generate-vue): change generate vue code location

* fix(generate-vue): fix generate route did not export

* feat(docs): 增加跟本地后端直连的方案 (#208)

* docs(readme): 增加后端的启动描述

* feat(chore): change dependencies type to workspace:* (#216)

* chore: add code review action (#215)

* chore(release): publish (#219)

* chore(release): publish

 - @opentiny/tiny-engine-mock@1.0.1
 - @opentiny/tiny-engine-block-build@1.0.0
 - @opentiny/tiny-engine-builtin-component@1.0.0
 - @opentiny/tiny-engine-canvas@1.0.1
 - @opentiny/tiny-engine-common@1.0.1
 - @opentiny/tiny-engine-controller@1.0.1
 - @opentiny/tiny-engine@1.0.0-beta.2
 - @opentiny/tiny-engine-http@1.0.1
 - @opentiny/tiny-engine-i18n-host@1.0.1
 - @opentiny/tiny-engine-plugin-block@1.0.2
 - @opentiny/tiny-engine-plugin-bridge@1.0.2
 - @opentiny/tiny-engine-plugin-data@1.0.2
 - @opentiny/tiny-engine-plugin-datasource@1.0.2
 - @opentiny/tiny-engine-plugin-help@1.0.2
 - @opentiny/tiny-engine-plugin-i18n@1.0.2
 - @opentiny/tiny-engine-plugin-materials@1.0.2
 - @opentiny/tiny-engine-plugin-page@1.0.2
 - @opentiny/tiny-engine-plugin-robot@1.0.2
 - @opentiny/tiny-engine-plugin-schema@1.0.2
 - @opentiny/tiny-engine-plugin-script@1.0.2
 - @opentiny/tiny-engine-plugin-tree@1.0.2
 - @opentiny/tiny-engine-plugin-tutorial@1.0.2
 - @opentiny/tiny-engine-setting-design@1.0.2
 - @opentiny/tiny-engine-setting-events@1.0.2
 - @opentiny/tiny-engine-setting-props@1.0.2
 - @opentiny/tiny-engine-setting-styles@1.0.2
 - @opentiny/tiny-engine-svgs@1.0.2
 - @opentiny/tiny-engine-theme-dark@1.0.2
 - @opentiny/tiny-engine-theme-light@1.0.3
 - @opentiny/tiny-engine-toolbar-breadcrumb@1.0.2
 - @opentiny/tiny-engine-toolbar-clean@1.0.2
 - @opentiny/tiny-engine-toolbar-collaboration@1.0.2
 - @opentiny/tiny-engine-toolbar-fullscreen@1.0.2
 - @opentiny/tiny-engine-toolbar-generate-vue@1.0.2
 - @opentiny/tiny-engine-toolbar-lang@1.0.2
 - @opentiny/tiny-engine-toolbar-layout@1.0.2
 - @opentiny/tiny-engine-toolbar-checkinout@1.0.2
 - @opentiny/tiny-engine-toolbar-logo@1.0.2
 - @opentiny/tiny-engine-toolbar-logout@1.0.2
 - @opentiny/tiny-engine-toolbar-media@1.0.2
 - @opentiny/tiny-engine-toolbar-preview@1.0.2
 - @opentiny/tiny-engine-toolbar-redoundo@1.0.2
 - @opentiny/tiny-engine-toolbar-refresh@1.0.2
 - @opentiny/tiny-engine-toolbar-save@1.0.2
 - @opentiny/tiny-engine-toolbar-setting@1.0.2
 - @opentiny/tiny-engine-utils@1.0.2
 - @opentiny/tiny-engine-dsl-vue@1.0.2
 - @opentiny/tiny-engine-webcomponent-core@1.0.2

* chore(release): publish

 - @opentiny/tiny-engine-mock@1.0.2
 - @opentiny/tiny-engine-block-build@1.0.1
 - @opentiny/tiny-engine-builtin-component@1.0.0
 - @opentiny/tiny-engine-canvas@1.0.2
 - @opentiny/tiny-engine-common@1.0.1
 - @opentiny/tiny-engine-controller@1.0.2
 - @opentiny/tiny-engine@1.0.0-beta.3
 - @opentiny/tiny-engine-http@1.0.1
 - @opentiny/tiny-engine-i18n-host@1.0.2
 - @opentiny/tiny-engine-plugin-block@1.0.2
 - @opentiny/tiny-engine-plugin-bridge@1.0.2
 - @opentiny/tiny-engine-plugin-data@1.0.2
 - @opentiny/tiny-engine-plugin-datasource@1.0.2
 - @opentiny/tiny-engine-plugin-help@1.0.2
 - @opentiny/tiny-engine-plugin-i18n@1.0.2
 - @opentiny/tiny-engine-plugin-materials@1.0.2
 - @opentiny/tiny-engine-plugin-page@1.0.2
 - @opentiny/tiny-engine-plugin-robot@1.0.2
 - @opentiny/tiny-engine-plugin-schema@1.0.2
 - @opentiny/tiny-engine-plugin-script@1.0.2
 - @opentiny/tiny-engine-plugin-tree@1.0.2
 - @opentiny/tiny-engine-plugin-tutorial@1.0.2
 - @opentiny/tiny-engine-setting-design@1.0.2
 - @opentiny/tiny-engine-setting-events@1.0.2
 - @opentiny/tiny-engine-setting-props@1.0.2
 - @opentiny/tiny-engine-setting-styles@1.0.2
 - @opentiny/tiny-engine-svgs@1.0.3
 - @opentiny/tiny-engine-theme-dark@1.0.3
 - @opentiny/tiny-engine-theme-light@1.0.4
 - @opentiny/tiny-engine-toolbar-breadcrumb@1.0.2
 - @opentiny/tiny-engine-toolbar-clean@1.0.2
 - @opentiny/tiny-engine-toolbar-collaboration@1.0.2
 - @opentiny/tiny-engine-toolbar-fullscreen@1.0.2
 - @opentiny/tiny-engine-toolbar-generate-vue@1.0.2
 - @opentiny/tiny-engine-toolbar-lang@1.0.3
 - @opentiny/tiny-engine-toolbar-layout@1.0.3
 - @opentiny/tiny-engine-toolbar-checkinout@1.0.2
 - @opentiny/tiny-engine-toolbar-logo@1.0.2
 - @opentiny/tiny-engine-toolbar-logout@1.0.3
 - @opentiny/tiny-engine-toolbar-media@1.0.2
 - @opentiny/tiny-engine-toolbar-preview@1.0.2
 - @opentiny/tiny-engine-toolbar-redoundo@1.0.2
 - @opentiny/tiny-engine-toolbar-refresh@1.0.2
 - @opentiny/tiny-engine-toolbar-save@1.0.2
 - @opentiny/tiny-engine-toolbar-setting@1.0.2
 - @opentiny/tiny-engine-utils@1.0.3
 - @opentiny/tiny-engine-dsl-vue@1.0.2
 - @opentiny/tiny-engine-webcomponent-core@1.0.3

* fix: 修复数据源mock数据不一致 (#211)

* fix: 修复数据源mock数据不一致

* fix:修复构建物料资产包重复组件

* fix:修改css文件cdn域名 (#228)

* fix:修改css文件cdn地址

* fix default img can't change width and height (#189)

* fix:插件面板固定后画布未自适应 (#234)

* fix: 修复数据源mock数据不一致

* fix:插件面板固定后画布未自适应

* fix:插件面板固定后画布未自适应

* fix:修复eslint报错

* [plugin-data] Fix state use jsfunction issue (#237)

* feat(monaco-editor-completion): 隔离不同代码编辑器自动补全的注册,变量声明增加自动补全去掉js函数和state变量的自动补全提示

* feat(state): 状态管理使用JS表达式创建变量的时候提示不可使用其他变量以及JS函数

* fix:materials sql (#231)

* fix: 修复数据源mock数据不一致

* fix:新增组件写入sql数据问题

* fix:修复资源管理工具类型切换 (#239)

* fix:修复资源管理工具类型切换

* fix: 左右两侧面板宽度固定为280px (#230)

* fix(styles-spacing): 增大物料设置内外边距时点击区域 #134 (#184)

* fix(styles-spacing): 增大物料设置内外边距时点击区域 #134

* fix:预览引入builtin组件依赖,built组件样式文件注入js (#251)

* add config (#262)

* add config

* update config

* fix: 修复由于物料边框引起的左侧面板样式问题 (#247)

* fix: 设计器构建后使用vue runtime prod build(本地开发保持development, preview预览保持development) (#254)

* fix(canvas-renderer): 修复 isNative component 判断失效的 bug (#241)

* feat: js panel add jsx support  (#253)

* feat: JS面板支持JSX语法

* fix: 画布解析JS表达式时支持JSX语法

* fix: 修复画布解析JSX表达式时会返回undefined

* feat: 添加Tree和Tooltip的自定义渲染函数属性

* fix: 修改变量名

* fix(toolbar-save): 修复保存时红色 icon 相对位置丢失的 bug (#250)

* feat(setting-stylePanel): 样式面板编辑全局样式新UI与交互 (#238)

* feat(setting-stylePanel): 样式面板编辑全局样式新UI与交互

* feat(setting-stylePanel): 样式面板编辑全局样式新UI与交互

* feat(setting-stylePanel): 样式面板编辑全局样式新UI与交互-细节优化

* feat(setting-stylePanel): 样式面板编辑全局样式新UI与交互-细节优化

* fix(settingPanel-style): 样式面板新交互细节调整

* fix(setting-stylePanel): 修复样式选择器颜色不对的 bug

* fix(setting-stylePanel): 样式选择器间距调整

* fix(setting-stylePanel): 调整样式选择器距离顶部距离与下拉列表滚动条颜色

* feat(setting-style): add help link button

* fix(setting-style): delete empty row by code review

* fix(material-panel-svg): 修复物料左侧插件面板里图标旋转的问题 (#280)

* docs(readme): 增加后端的启动描述

* docs(readme): 增加后端的启动描述

* docs(readme): 增加后端的启动描述

* docs(readme): 增加后端的启动描述

* docs(readme): 更新图片地址

* docs(readme): 更新图片地址

* fix(material-panel-svg): 修复物料左侧插件面板里图标旋转的问题

* fix:组件sql语句字段校验、提示优化 (#275)

* fix:修复新增组件sql语句字段校验

* fix:优化脚本提示

* fix:函数名优化

* fix:修复更新的sql问题

* fix:TinyTabItem、TinyBreadcrumbItem组件配置有误 (#272)

* fix:TinyTabItem、TinyBreadcrumbItem组件配置有误

* fix:修复tiny-vue组件导出名称有误

* fix: 修复robot plugin不存在时发生的白屏错误 (#271)

* fix: 修复robot plugin不存在时发生的白屏错误

* styled: 修改代码风格

* fix: 修改监视意见

* fix: 修复画布选中框的显示层级不正确的问题 (#246)

* fix: 修复画布选中框的显示层级不正确的问题

* fix: 修正错误注释

* fix: 选中节点后支持横向滚动到节点

* fix: 根据垂直滚动条调整工具操作条位置

* fix: 删除冗余代码

* fix: 代码优化

* fix: 修改变量名称

* fix: 调整函数顺序,消除eslint错误

* feat: 移除前端解锁前判断权限的逻辑,适配后台解锁接口 (#276)

* 修复画布没有根元素,与vue出码、预览不一致 (#259)

* feat: 页面输入输出配置,配置内有内容时,按钮替换为展示部分文案内容。

* feat: 方法名修改更加符合语义

* fix: 1. 给画布添加根元素(与出码、预览保持一致)。2. 选中画布相当于选中根节点,右侧面板会出现可以添加属性的节点。3. 可以支持给根节点添加类名,id、ref,并修改样式。 4. 支持给根元素添加事件,循环等

* fix: 意见修复

* fix: 修复较低的分辨率下画布初始缩放不正确的问题 (#274)

* fix(common): fix lifecycle unmount completionProvider null state caught error (#281)

* fix: 修改远程字段发送请求无效 (#278)

* fix:修复修改远程字段发送请求无效

* fix:修复请求参数处理函数未生效

* fix:修复数据源表单校验提前退出

* fix:修改提示语

* fix:按review添加注释

* Fix mockServer block group deleted bug (#279)

* fix:修复第三方组件无法渲染 (#288)

* fix:修复第三方组件无法渲染

* fix:区分环境加载prod

* fix(chore): sync vue version (#285)

* fix(chore): sync vue version

* fix(chore): sync vue-i18n version

* fix(chore): change vue and vue-i18n to peerdependencies

* fix(chore): update block build dependencies

* fix(chore): change vue-generator dependencies to update

* fix(upload-button)修复下载按钮弹出没有遮罩 (#300)

* fix: 修复新建区块的表单确定时未校验的问题 (#302)

* fix: 修复代码编辑器全屏时的样式问题 (#303)

* fix: 修复属性面板中设置空字符串的问题 (#307)

* fix(setting-stylePanel): 只允许有一个 id,样式选择器只能添加一个 id (#295)

* fix(plugin-page): setting home should not close settingPanel (#308)

* feat(setting-advanced): addcustomEvent popover change to dialog (#297)

* feat(setting-advanced): addcustomEvent popover change to dialog

* fix(setting-advanced): add custom event align left with modal title

* fix(style): delete selected symbol on select component (#306)

* fix(style): delete selected symbol on select component

* fix(style): delete space after delete selectedSymbol

* fix(http): 优化 http 接口报错 ui, 接口详情不展示在 title (#293)

* fix: 修复preview生产打包的时候repl引入的monaco-editor里的worker跨域报错 (#245)

* fix: 修复preview生产打包的时候repl引入的monaco-editor里的worker跨域报错

* feat(design-core/preview): 预览增加调试按钮来打开vue-repl编辑模式,并实现编辑器懒加载

* fix(design-core/preview): 修复repl-patch引入脚本路径模块化不支持importScripts问题

* fix: 数据源远程字段表单验证样式修改 (#309)

* fix: 数据源远程字段表单验证样式修改

* fix:资源管理工具类型文字字色与设计稿不一致 (#319)

* fix:资源管理工具类型文字字色与设计稿不一致

* fix:调整资源工具类型字体

* bundle.json and tiny-vue.css is 404 in prod mode (#315)

* chore(release): publish (#320)

- @opentiny/tiny-engine-mock: 1.0.2 => 1.0.3
- @opentiny/tiny-engine-block-build: 1.0.1 => 1.0.2
- @opentiny/tiny-engine-builtin-component: 1.0.0 => 1.0.1
- @opentiny/tiny-engine-canvas: 1.0.2 => 1.0.3
- @opentiny/tiny-engine-common: 1.0.1 => 1.0.2
- @opentiny/tiny-engine-controller: 1.0.2 => 1.0.3
- @opentiny/tiny-engine: 1.0.0-beta.3 => 1.0.0-beta.4
- @opentiny/tiny-engine-http: 1.0.1 => 1.0.2
- @opentiny/tiny-engine-i18n-host: 1.0.2 => 1.0.3
- @opentiny/tiny-engine-plugin-block: 1.0.2 => 1.0.3
- @opentiny/tiny-engine-plugin-bridge: 1.0.2 => 1.0.3
- @opentiny/tiny-engine-plugin-data: 1.0.2 => 1.0.3
- @opentiny/tiny-engine-plugin-datasource: 1.0.2 => 1.0.3
- @opentiny/tiny-engine-plugin-help: 1.0.2 => 1.0.3
- @opentiny/tiny-engine-plugin-i18n: 1.0.2 => 1.0.3
- @opentiny/tiny-engine-plugin-materials: 1.0.2 => 1.0.3
- @opentiny/tiny-engine-plugin-page: 1.0.2 => 1.0.3
- @opentiny/tiny-engine-plugin-robot: 1.0.2 => 1.0.3
- @opentiny/tiny-engine-plugin-schema: 1.0.2 => 1.0.3
- @opentiny/tiny-engine-plugin-script: 1.0.2 => 1.0.3
- @opentiny/tiny-engine-plugin-tree: 1.0.2 => 1.0.3
- @opentiny/tiny-engine-plugin-tutorial: 1.0.2 => 1.0.3
- @opentiny/tiny-engine-setting-design: 1.0.2 => 1.0.3
- @opentiny/tiny-engine-setting-events: 1.0.2 => 1.0.3
- @opentiny/tiny-engine-setting-props: 1.0.2 => 1.0.3
- @opentiny/tiny-engine-setting-styles: 1.0.2 => 1.0.3
- @opentiny/tiny-engine-svgs: 1.0.3 => 1.0.4
- @opentiny/tiny-engine-theme-dark: 1.0.3 => 1.0.4
- @opentiny/tiny-engine-theme-light: 1.0.4 => 1.0.5
- @opentiny/tiny-engine-toolbar-breadcrumb: 1.0.2 => 1.0.3
- @opentiny/tiny-engine-toolbar-clean: 1.0.2 => 1.0.3
- @opentiny/tiny-engine-toolbar-collaboration: 1.0.2 => 1.0.3
- @opentiny/tiny-engine-toolbar-fullscreen: 1.0.2 => 1.0.3
- @opentiny/tiny-engine-toolbar-generate-vue: 1.0.2 => 1.0.3
- @opentiny/tiny-engine-toolbar-lang: 1.0.3 => 1.0.4
- @opentiny/tiny-engine-toolbar-layout: 1.0.3 => 1.0.4
- @opentiny/tiny-engine-toolbar-checkinout: 1.0.2 => 1.0.3
- @opentiny/tiny-engine-toolbar-logo: 1.0.2 => 1.0.3
- @opentiny/tiny-engine-toolbar-logout: 1.0.3 => 1.0.4
- @opentiny/tiny-engine-toolbar-media: 1.0.2 => 1.0.3
- @opentiny/tiny-engine-toolbar-preview: 1.0.2 => 1.0.3
- @opentiny/tiny-engine-toolbar-redoundo: 1.0.2 => 1.0.3
- @opentiny/tiny-engine-toolbar-refresh: 1.0.2 => 1.0.3
- @opentiny/tiny-engine-toolbar-save: 1.0.2 => 1.0.3
- @opentiny/tiny-engine-toolbar-setting: 1.0.2 => 1.0.3
- @opentiny/tiny-engine-utils: 1.0.3 => 1.0.4
- @opentiny/tiny-engine-dsl-vue: 1.0.2 => 1.0.3
- @opentiny/tiny-engine-webcomponent-core: 1.0.3 => 1.0.4

* refactor: 解决子包循环依赖问题 (#313)

* refactor: move common/js to controller/js

* refactor: replace common/js

* refactor: replace ../js

* refactor: update package.json

* refactor: resolve canvas rely on common

* refactor: remove controller deps in http

* refactor: add canvas renderer state

* refactor: remove useless file ext

* refactor: modify controller deps path

* refactor: fix eslint

* refactor: resolve http env

* fix: switch page error (#331)

* fix: drag block into canvas error (#336)

* fix: canvas api error (#338)

* fix(datasource): data type icon invisible #312 (#332)

* fix(datasource): data type icon invisible

* fix(common): #325 reduce unnecessary network requests.

* style(datasource): remove unnecessary comment

---------

Co-authored-by: zeyong.cai <zeyong.cai@xquant.com>

* fix(build): 修复构建设计器产物 ref 值未转化的 bug (#347)

* fix(preview): fix preview vue-repl unsupport jsx bug (#343)

* docs: add project name to issue template (#335)

* feat: 状态管理代码编辑UI优化 (#318)

* feat: 状态管理代码编辑UI优化

* fix(material): elTable formatter should be function type (#355)

* fix(readme-build): 添加Readme中构建产物所在文件夹信息 (#367)

* fix(scrollbar): fix robot plugin scrollbar hide almost all scrollbar bug (#340)

* fix(scrollbar): fix robot plugin scrollbar hide almost all scrollbar bug

* fix(scrollbar): change by review comment

* fix(theme-scrollbar): change by review comment

* fix(theme-base): apply default scrollbar style to body * children

* docs: 文件名称CHANGELOG拼写错误,修改文件名称 (#389)

* fix(errorMonitor): add config for errormonitor (#381)

* fix(controller-environment): preserve import.meta.env variable when build controller lib (#380)

* fix(settings): fix text wrap of bind condition (#391)

Fixes #370

* feat:增加物料:TinyDatePicker和TinyNumeric (#399)

* 增加物料:TinyDatePicker和TinyNumeric

* 修改disabled使用MetaSwitch

* Fix:编辑器设置dark主题后预览页header文字颜色不正确 (#403)

* fix:编辑器设置dark主题后预览页header文字颜色不正确

* fix:调整主题

* port 000037 engine-ai-plugins

* setup live component

* improve live component

* add component mode to AI plugin

* update design doc

---------

Co-authored-by: OpenTiny <opentiny@sina.com>
Co-authored-by: ajaxzheng <894103554@qq.com>
Co-authored-by: chilingling <26962197+chilingling@users.noreply.github.com>
Co-authored-by: wenmine <wwmmail@foxmail.com>
Co-authored-by: lhuans <145339349+lhuans@users.noreply.github.com>
Co-authored-by: yaoyun8 <142570291+yaoyun8@users.noreply.github.com>
Co-authored-by: Hexqi <wu_12556@126.com>
Co-authored-by: tianxin <146069396+ianxinnew@users.noreply.github.com>
Co-authored-by: gargameljyh <58694428+gargameljyh@users.noreply.github.com>
Co-authored-by: lichunn <46984087+lichunn@users.noreply.github.com>
Co-authored-by: Xppp0217 <82315158+Xppp0217@users.noreply.github.com>
Co-authored-by: lizhijie429 <632163606@qq.com>
Co-authored-by: Gene <Pacify.98@gmail.com>
Co-authored-by: rhlin <r.h.lin@live.cn>
Co-authored-by: Lu17301156525 <128358973+Lu17301156525@users.noreply.github.com>
Co-authored-by: rhlin <r.h.lin@163.com>
Co-authored-by: GaoNeng <31283122+GaoNeng-wWw@users.noreply.github.com>
Co-authored-by: abin <luocongqiu@gmail.com>
Co-authored-by: zeyong tsai <tsai.zeyong@icloud.com>
Co-authored-by: zeyong.cai <zeyong.cai@xquant.com>
Co-authored-by: Kagol <kagol@sina.com>
Co-authored-by: yuhki <128052955+yuhkikele@users.noreply.github.com>
Co-authored-by: Xie Jay <xiejay97@gmail.com>
Co-authored-by: fox ouyang <stwflyfox@163.com>
2024-05-11 17:48:00 +08:00
..
public AI plugins (#418) 2024-05-11 17:48:00 +08:00
scripts AI plugins (#418) 2024-05-11 17:48:00 +08:00
src AI plugins (#418) 2024-05-11 17:48:00 +08:00
README.md AI plugins (#418) 2024-05-11 17:48:00 +08:00
components.json AI plugins (#418) 2024-05-11 17:48:00 +08:00
index.html AI plugins (#418) 2024-05-11 17:48:00 +08:00
package.json AI plugins (#418) 2024-05-11 17:48:00 +08:00
postcss.config.js AI plugins (#418) 2024-05-11 17:48:00 +08:00
tailwind.config.js AI plugins (#418) 2024-05-11 17:48:00 +08:00
tsconfig.json AI plugins (#418) 2024-05-11 17:48:00 +08:00
tsconfig.node.json AI plugins (#418) 2024-05-11 17:48:00 +08:00
vite.config.ts AI plugins (#418) 2024-05-11 17:48:00 +08:00

README.md

engine-ai-plugins 设计文档

目标

TinyEngine 作为一个低代码引擎,内置了一套更加结构化、精简的 schema 用于描述 UI 应用逻辑。相比原生代码LLM AI 在理解、生成 schema 时会更加高效、准确,因此 engine-ai-plugins 将通过开发一组 TinyEngine 插件探索 LLM AI 和低代码引擎结合的最佳实践。

目前实现中包含以下两个 AI 插件:

  • page creator根据文字和图片输入的提示词生成稳定、丰富的 TinyEngine 页面,且产出物为 TinyEngine JSON schema。在仓库中已有的 robot plugin 实现中,看起来是让 LLM AI 输出标准的 Vue2 代码,再通过 /app-center/api/ai/chat API 获取的返回结果中就有了 schema可能是该 API 中包含 Vue -> schema 的实现,但暂未看到对应代码开源)。
  • component editor通过松散的文字输入与结构化的表单 UI 混合编辑每个组件的属性,实现效率的最大化,可以看作是对当前组件属性编辑器的一个扩展。

设计思路概览

page creator 页面模式:基于 prompt engineering 优化 schema 生成结果

在 TinyEngine 中已有不少注册的组件,且其架构支持持续实现、注册新的组件,如果让 LLM AI 知道这些组件的存在、理解这些组件的用法、收到需求时正确组合这些组件完成需求,就是 page creator 的实验方向。

由于 TinyEngine 组件对于 LLM AI 来说不是热知识,所以通常有 prompt engineering 和 fine-tuning 两个方案向 LLM AI 注入知识在我们过往的经验中prompt engineering 在这类场景下已经足够好。

TinyEngine 中通过一个 bundle.json 维护了注册的组件和示例代码,经过对比测试,我们发现仅仅将示例代码放入 prompt 中,生成效果就不错,希望进一步提升 LLM AI 表现,可以维护更详细或多个 snippet 示例。

这个脚本完成了从 bundle.json 拼接 prompt 的工作,目前对质量比较高的组件进行了拼接。

除了组件使用知识之外prompt 中还包含了 TinyEngine schema 的 Typescript interface在对比测试中同样发现仅保留必要的结构、样式相关的字段LLM AI 的注意力可以更加稳定集中在主要任务中,显著提升了 schema 生成的稳定性。

在插件 UX 设计中,由于 page creator 的定位是从零生成一个基础页面,供后续的迭代修改,所以输入部分支持文字描述和图片描述(以来 gpt4-vision 模型)。

page creator 专注页面结构和样式的实现,也代表了一种可行的低代码 AI 插件的设计思路:由于低代码引擎从 schema 到编辑器 GUI 都对视图、状态、逻辑做了清晰的划分,所以也可以开发多个各司其职的 AI 插件,有助于提升完成单项任务的稳定性且成本更可控,而不是追求一个 AI 插件完成所有的页面搭建工作。

page creator 组件模式:动态创建复杂组件

页面模式的好处是生成的是可二次编辑的 TinyEngine 页面,其中每个元素对应一个 TinyEngine 组件。但如果我们希望生成一些逻辑内聚但复杂的逻辑,例如:

  • 一个计算器 UI
  • 一个 K8s 日志查看器 UI

它们会产生大量的 TinyEngine 组件。但这些组件大部分并不需要让用户二次编辑因此只会带来使用上的不便和性能下降。page creator 组件模式就是为解决这一问题而实现的,组件模式下 page creator 插件会生成一个与需求对应的 Vue SFC 组件代码,目前为了适配 TinyEngine 中的一些预览加载的能力,我们约束 Vue SFC 只能使用部分预置的 UI 组件。

在此基础上,我们开发了一个 Live 组件,其功能是输入 Vue SFC 组件代码,进行渲染。与 LLM AI 生成的 Vue SFC 组件代码相配合,就可以动态向页面插入一个内聚的复杂组件。

component editorAI form 混合编辑

虽然同样借助 LLM AI 的能力,但 component editor 的实验方向和 page creator 非常不同。在 component editor 中,我们设计了一种 AI form 架构,可以最大程度结合自然语言松散输入效率高和结构化 UI 精确输入准确性高的优点,降低用户使用低代码引擎的技术门槛。

以 TinyEngine 中的 TinySelect 组件为例,它包含了 searchable、closable、placeholder 等一系列常规属性的配置能力,这些配置通过表单 UI 输入准确性高、操作便捷。但它还包含 options 这样的复杂数据结构,目前 TinyEngine 中预期使用代码编辑器进行配置,对于低代码引擎用户来说还是有一定门槛。即使设计了专用的 JSON 输入 UI也有较高的学习成本和操作复杂度。这时结合对应属性的数据结构和用户提示词让用户通过 增加 10 个水果的选项 这样的方式进行配置,就带来了很大的效率提升。

另一个使用低代码引擎的场景是静态页面,例如官网或 H5 活动页面这类网站通常包含大量的文案编写工作例如宣传语。AI form 同样可以将输入文案的场景和 LLM AI 结合,让 LLM AI 完成它最擅长的 text-gen 工作。

最后一类更为重要的使用场景是页面动态逻辑的编辑。尽管 TinyEngine 对常见的动态能力做了结构化的封装,但 state、methods、loop 等概念对于缺少专业代码知识的用户来说仍然是复杂的抽象概念。component editor 也实现了基于提示词编辑这些动态逻辑参数的能力,例如输入 点击创建一个 todocompnent editor 会从 LLM AI 中生成一组结果:

  • currentTodo state 和 todos state
  • addTodo method
  • onClick 事件回调配置

这些都是原本的用户自行学习配置较为复杂的内容。

AI form 在技术架构上,是对 LLM AI functional calling 能力的封装:

  • 通过对类型的封装,表单 UI 和 LLM AI 共享一套类型逻辑。
  • 通过状态机封装,实现对于不同状态数据的呈现和管理。

在这个文件中可以看到当前几个已经封装为 AI form 的低代码组件的封装方式,基本只需要声明少量类型即可。

状态机逻辑可以参考这个文件中的 Machine 实现。

使用非 Vue 技术栈开发插件

由于 AI UI 生态中 React 更为活跃,所以为了验证使用 React 开发 TinyEngine 插件的可行性,当前仓库中的插件均基于 React 开发。遇到的问题是通过 useCanvas 等 Vue hook 获取状态时存在异常,暂未深入调查,代码中通过依赖注入的形式修复。

Demo 视频

视频链接

使用方式

当前仓库未发布至 NPM可以通过 pnpm i $FOLDER 的方式本地安装测试。在当前仓库中,通过以下方式打包:

cd engine-ai-plugins
yarn
yarn build:lib

在 TinyEngine 中,在 packages/design-core/config/addons.js 内加载插件:

import { useCanvas, useHistory } from '@opentiny/tiny-engine-controller'
import { getPlugins } from 'engine-ai-plugins'

const { PageCreator, ComponentEditor } = getPlugins({ useCanvas, useHistory })

const addons = {
  plugins: [PageCreator, ComponentEditor]
}

使用时,输入 OpenAI API key按需配置代理。