Skip to content

Commit 0e6d103

Browse files
committed
feat:AI搭建添加撤销
1 parent 3e61fcd commit 0e6d103

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/plugins/robot/src/Main.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ import {
122122
type Component
123123
} from 'vue'
124124
import { Notify, Loading, TinyPopover, TinyDialogBox } from '@opentiny/vue'
125-
import { useCanvas, useModal, getMetaApi, META_SERVICE } from '@opentiny/tiny-engine-meta-register'
125+
import { useHistory, useCanvas, useModal, getMetaApi, META_SERVICE } from '@opentiny/tiny-engine-meta-register'
126126
import { ToolbarBase } from '@opentiny/tiny-engine-common'
127127
import {
128128
TrContainer,
@@ -321,6 +321,7 @@ export default {
321321
const newValue = JSON.parse(match[1])
322322
// 使用 applyPatch 修改 Schema
323323
const result = newValue.reduce(jsonpatch.applyReducer, currentJson)
324+
useHistory().addHistory()
324325
325326
sessionProcess.messages.push(getAiRespMessage(JSON.stringify(result, null, 2), chatMessage.role))
326327
sessionProcess.displayMessages.push(getAiDisplayMessage(MESSAGE_TIP, chatMessage.role, result, id))

0 commit comments

Comments
 (0)