Files
multica/packages/views
Naiyuan Qing 831ef926e1 fix(editor): limit paste-as-file to chat (#6043)
#6019 opted four composers into converting an over-threshold plain-text
paste into a `pasted-text.txt` attachment. Only chat should: a wall of
text there is context handed to an agent for one turn, and the body is
not what anyone reads. In an issue comment the paste IS prose a human
reader is expected to see in the thread, so hiding it behind an
attachment chip makes the thread worse, not better.

So the three comment surfaces — new comment, reply, comment edit — stop
passing `pasteAsFileThreshold`. Nothing else changes: the extension, the
threshold constant and the failed-paste recovery all stay, because the
prop was always opt-in per editor and chat still uses every part of it.

The recovery test moves from comment-composers to
use-coordinated-uploads. Comments can no longer produce a paste-as-file
upload at all, so hosting the test there would pin a path that cannot
happen; the hook is where the contract actually lives, since the upload
outlives its mount and no editor can own the failure.

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-28 18:03:55 +08:00
..