Skip to content

Commit 1342bf4

Browse files
author
prima
committed
fix: Agent with the new editor (choices and updating)
1 parent f3128f5 commit 1342bf4

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

klite.embd

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38121,7 +38121,7 @@ class MarkdownWYSIWYG {
3812138121
scrollToBottom()
3812238122
}
3812338123

38124-
let overwriteRawContents = () => {
38124+
let overwriteRawContents = async () => {
3812538125
rawTextEditor.innerHTML = gameText.innerHTML
3812638126
editor.setValue(editor._htmlToMarkdown(rawTextEditor.innerHTML))
3812738127
scrollToBottom()
@@ -38145,7 +38145,10 @@ class MarkdownWYSIWYG {
3814538145
// Handler for agent
3814638146
addThought = (wrapperHandler, prompt, onlyDisplay, onlyAdd) => {
3814738147
originalAddThought(wrapperHandler, prompt, onlyDisplay, onlyAdd)
38148-
overwriteRawContents()
38148+
if (gameText.contentEditable === "true")
38149+
{
38150+
overwriteRawContents()
38151+
}
3814938152
}
3815038153

3815138154
// Handler for language support

0 commit comments

Comments
 (0)