feat(text-selection): add text selection menu with quick actions (#283)

Add TextSelectionMenu component that appears when selecting text in messages.
Provides quick actions: Add to chat, New session, Copy.

- Add TextSelectionMenu.tsx component with desktop and mobile layouts
- Integrate menu into MessageBody with message-content-text ref
- Add mobile CSS for text selection behavior
This commit is contained in:
gsxdsm
2026-02-04 11:13:49 +02:00
committed by GitHub
parent a264393f1b
commit 66da4ad8f4
3 changed files with 343 additions and 15 deletions
+12
View File
@@ -119,6 +119,18 @@
pointer-events: auto;
}
/* Prevent system context menu on message content when using custom selection menu */
:root.mobile-pointer:not(.desktop-runtime) .message-content-text {
-webkit-touch-callout: none;
-webkit-user-select: text;
user-select: text;
}
/* Allow system context menu only when explicitly requested via the "More" button */
:root.mobile-pointer:not(.desktop-runtime) .message-content-text.show-system-menu {
-webkit-touch-callout: default;
}
/* Improve mobile spacing */
:root.mobile-pointer:not(.desktop-runtime) .px-4 {
padding-left: 1rem !important;