Chat: highlighted, clickable links in messages
Markdown links, autolinks and bare http(s)/www. URLs open externally through url_launcher (http, https and mailto only) in assistant markdown and operator messages; code is never linkified. Links use the host primary colour with an underline that thickens on hover, and offer Copy link on long press and right-click without breaking text selection.
This commit is contained in:
@@ -9,6 +9,7 @@ import '../sessions/chat_adaptive.dart';
|
||||
import 'chat_attachment_gallery.dart';
|
||||
import '../../domain/chat_tool_calls.dart';
|
||||
import 'chat_copy_button.dart';
|
||||
import 'chat_link_text.dart';
|
||||
import 'chat_message_bubble.dart';
|
||||
import 'chat_turn_activity_view.dart';
|
||||
import 'native_disclosure.dart';
|
||||
@@ -150,7 +151,7 @@ class ChatMessageView extends StatelessWidget {
|
||||
.map((part) => '${part['text'] ?? ''}')
|
||||
.join('\n');
|
||||
final widgets = <Widget>[
|
||||
if (text.trim().isNotEmpty) SelectableText(text),
|
||||
if (text.trim().isNotEmpty) ChatLinkText(text),
|
||||
for (final part in parts.where(_isFile))
|
||||
if (!chatPartIsThumbnail(part)) _attachment(context, part),
|
||||
for (final part in parts)
|
||||
|
||||
Reference in New Issue
Block a user