Repository navigation
Commit 0929aeb
committed
Add copy-to-clipboard functionality for assistant message parts
Implements feature requested in issue anomalyco#5641. Users can now click on:
- Text parts (code snippets, markdown content)
- Tool parts (command outputs, file contents)
Clicking copies the content to clipboard and shows a success toast.
Text selection (click+drag) continues to work as before - if text is
selected, the copy action is skipped to preserve existing behavior.
Changes:
- Extended session context with copyToClipboard helper function
- Added onMouseUp handlers to TextPart and ToolPart components
- Helper checks for text selection, copies to clipboard, and shows toast
- Tool parts only copy when completed with output available1 parent c23ea2a commit 0929aeb
1 file changed
Lines changed: 33 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| 90 | + | |
90 | 91 | | |
91 | 92 | | |
92 | 93 | | |
| |||
817 | 818 | | |
818 | 819 | | |
819 | 820 | | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
820 | 831 | | |
821 | 832 | | |
822 | 833 | | |
| |||
830 | 841 | | |
831 | 842 | | |
832 | 843 | | |
| 844 | + | |
833 | 845 | | |
834 | 846 | | |
835 | 847 | | |
| |||
1193 | 1205 | | |
1194 | 1206 | | |
1195 | 1207 | | |
1196 | | - | |
| 1208 | + | |
| 1209 | + | |
| 1210 | + | |
| 1211 | + | |
| 1212 | + | |
| 1213 | + | |
| 1214 | + | |
1197 | 1215 | | |
1198 | 1216 | | |
1199 | 1217 | | |
| |||
1212 | 1230 | | |
1213 | 1231 | | |
1214 | 1232 | | |
1215 | | - | |
| 1233 | + | |
| 1234 | + | |
1216 | 1235 | | |
1217 | 1236 | | |
| 1237 | + | |
| 1238 | + | |
| 1239 | + | |
| 1240 | + | |
| 1241 | + | |
| 1242 | + | |
| 1243 | + | |
| 1244 | + | |
1218 | 1245 | | |
1219 | 1246 | | |
1220 | 1247 | | |
| |||
1257 | 1284 | | |
1258 | 1285 | | |
1259 | 1286 | | |
| 1287 | + | |
| 1288 | + | |
| 1289 | + | |
| 1290 | + | |
1260 | 1291 | | |
1261 | 1292 | | |
1262 | 1293 | | |
| |||
0 commit comments