Skip to content

Commit 871068a

Browse files
committed
fix(rich-md-editor): lock the editor immediately when an agent edit starts, even if the body is unchanged
1 parent b064503 commit 871068a

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/rich-markdown-editor/rich-markdown-editor.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,7 @@ export function LoadedRichMarkdownEditor({
280280
if (!editor) return
281281
if (isStreaming) {
282282
wasStreamingRef.current = true
283+
if (editor.isEditable) editor.setEditable(false)
283284
const body = splitFrontmatter(content).body
284285
if (body === lastSyncedBodyRef.current) return
285286
pendingStreamBodyRef.current = body

0 commit comments

Comments
 (0)