AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.
Disable markdown as it causes crash for some responses
hunteraraujo82434a248c92
diff --git a/frontend/lib/views/chat/agent_message_tile.dart b/frontend/lib/views/chat/agent_message_tile.dartindex 4639b76bd4..851af1f06b 100644--- a/frontend/lib/views/chat/agent_message_tile.dart+++ b/frontend/lib/views/chat/agent_message_tile.dart@@ -28,14 +28,13 @@ class _AgentMessageTileState extends State<AgentMessageTile> {int artifactsCount = widget.chat.artifacts.length;bool containsMarkdown(String text) {- // Regular expression to detect Markdown patterns including code blocks.+ // Regular expression to detect Markdown patterns like headers, bold, links, etc.final RegExp markdownPattern = RegExp(r'(?:\*\*|__).*?(?:\*\*|__)|' + // Boldr'(?:\*|_).*?(?:\*|_)|' + // Italicr'\[.*?\]\(.*?\)|' + // Linksr'!\[.*?\]\(.*?\)|' + // Images- r'#{1,6}.*|' + // Headers- r'`.*?`', // Inline Code Blocks+ r'#{1,6}.*', // HeadersmultiLine: true,caseSensitive: false,);@@ -81,9 +80,10 @@ class _AgentMessageTileState extends State<AgentMessageTile> {Expanded(child: Container(padding: const EdgeInsets.fromLTRB(0, 10, 20, 10),- child: hasMarkdown+ child: false? Markdown(data: widget.chat.message)- : Text(widget.chat.message, maxLines: null),+ : SelectableText(widget.chat.message,+ maxLines: null),),),ElevatedButton(diff --git a/frontend/lib/views/chat/user_message_tile.dart b/frontend/lib/views/chat/user_message_tile.dartindex a707a6e53a..f8c5019db0 100644--- a/frontend/lib/views/chat/user_message_tile.dart+++ b/frontend/lib/views/chat/user_message_tile.dart@@ -54,7 +54,7 @@ class UserMessageTile extends StatelessWidget {// Padding for the text contentpadding: const EdgeInsets.fromLTRB(0, 10, 20, 10),// Displaying the user message with no max line limit- child: Text(+ child: SelectableText(message,maxLines: null,),