The open source coding agent.
TypeScript
fix(app): preserve undo history for plain-text paste (#13351)
Rasheed0771e3a8bee1
diff --git a/packages/app/src/components/prompt-input/attachments.ts b/packages/app/src/components/prompt-input/attachments.tsindex 232b7557df6..9ea2e62a65f 100644--- a/packages/app/src/components/prompt-input/attachments.ts+++ b/packages/app/src/components/prompt-input/attachments.ts@@ -89,6 +89,9 @@ export function createPromptAttachments(input: PromptAttachmentsInput) {}if (!plainText) return+ const inserted = typeof document.execCommand === "function" && document.execCommand("insertText", false, plainText)+ if (inserted) return+input.addPart({ type: "text", content: plainText, start: 0, end: 0 })}