You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Paste as Text still attaches an image when pasting from Microsoft Word on macOS #38466
Copying text from Microsoft Word on macOS and pasting it into the chat message box always adds an image attachment (a picture of the text) instead of inserting the text. Edit > Paste as Text (⌘⇧V, or clicking the menu item with the mouse) does the same. It has happened since the user started using T3 Code.
Diagnosis
Word puts both text/plain and an image version of the selection on the macOS clipboard. In apps/web/src/components/chat/ChatComposer.tsx (onComposerPaste), any pasted image takes the attachment path, because shouldHandleComposerAttachmentPaste (apps/web/src/components/chat/composerAttachmentFiles.ts:237) returns true as soon as an image is present, before it considers plainText. The Paste as Text flag (bypassAutoAttachment) is passed only as skipImageInlineChip to addComposerAttachments. It never stops the attachment. As a result, Paste as Text cannot paste plain text whenever the clipboard also holds an image.
Expected: when Paste as Text is armed, skip the attachment path and insert plainText. Possibly also prefer text by default when text/plain is present alongside an image from a rich-text source.
Checked against tag v0.1.10-nightly.20261116.4800 and main at 1c818a80. The logic is the same in both.
Steps to reproduce
On macOS, open a document in Microsoft Word and select some text.
Press ⌘C.
In the T3 Code desktop app, click the chat message box in a thread and press ⌘V. An image attachment is added instead of the text.
Repeat with ⌘⇧V, or with Edit > Paste as Text from the menu. An image is still attached.
Version
0.1.10-nightly.20261116.4800 (T3 Code Nightly desktop app). The code is unchanged on main at 1c818a80.
Environment
macOS 27.2 (Apple M3, arm64), T3 Code (Nightly) desktop app with its bundled local server, Microsoft Word.
Evidence
Source reading only: there is no error, so nothing appears in the logs. See the code references in Diagnosis.
Related issues
None found. Searched for paste/Word/image/Paste as Text.
Fix applied or workaround
Run pbpaste | pbcopy after copying from Word. This copies the plain text back to the clipboard without the image, and the next ⌘V pastes text.
Activity