From c65439244b1cc47fb394087fa6044ec25d87091a Mon Sep 17 00:00:00 2001 From: Sikander Saleem Date: Mon, 26 Oct 2026 14:53:45 +0300 Subject: [PATCH] copilot -> BARQ, barq file click to download added. --- .../copilot/screens/copilot_chat_page.dart | 4 ++-- .../copilot/screens/copilot_history_page.dart | 3 ++- .../copilot/widgets/copilot_message_bubble.dart | 17 +++++++---------- 3 files changed, 11 insertions(+), 13 deletions(-) diff --git a/lib/modules/copilot/screens/copilot_chat_page.dart b/lib/modules/copilot/screens/copilot_chat_page.dart index 524652d7..1997a259 100644 --- a/lib/modules/copilot/screens/copilot_chat_page.dart +++ b/lib/modules/copilot/screens/copilot_chat_page.dart @@ -137,7 +137,7 @@ class _CopilotChatPageState extends State { Widget build(BuildContext context) { return Scaffold( appBar: DefaultAppBar( - title: "ATOMS – AI Assistant", + title: "BARQ – AI Assistant", showCopilot: false, actions: [ IconButton( @@ -481,7 +481,7 @@ class _ShimmerBubble extends StatelessWidget { ).toShimmer(context: context, isShow: true); final name = Text( - isSender ? "Me" : "Atoms", //check the api if they send the user name + isSender ? "Me" : "BARQ", //check the api if they send the user name style: AppTextStyles.bodyText.copyWith(color: AppColor.neutral50, fontWeight: FontWeight.w600), ).toShimmer(context: context, isShow: true); diff --git a/lib/modules/copilot/screens/copilot_history_page.dart b/lib/modules/copilot/screens/copilot_history_page.dart index d8734b7b..acd812d2 100644 --- a/lib/modules/copilot/screens/copilot_history_page.dart +++ b/lib/modules/copilot/screens/copilot_history_page.dart @@ -66,7 +66,8 @@ class _CopilotHistoryPageState extends State { Widget build(BuildContext context) { return Scaffold( appBar: DefaultAppBar( - title: "Copilot History", + title: "History", + showCopilot: false, actions: [ Container( margin: const EdgeInsets.only(left: 12, right: 12), diff --git a/lib/modules/copilot/widgets/copilot_message_bubble.dart b/lib/modules/copilot/widgets/copilot_message_bubble.dart index f05ab0b4..d510993c 100644 --- a/lib/modules/copilot/widgets/copilot_message_bubble.dart +++ b/lib/modules/copilot/widgets/copilot_message_bubble.dart @@ -3,6 +3,7 @@ import 'dart:io'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_markdown_plus/flutter_markdown_plus.dart'; +import 'package:test_sa/controllers/api_routes/urls.dart'; import 'package:test_sa/extensions/context_extension.dart'; import 'package:test_sa/extensions/int_extensions.dart'; import 'package:test_sa/extensions/string_extensions.dart'; @@ -87,7 +88,7 @@ class CopilotMessageBubble extends StatelessWidget { ), 6.height, ], - if(message.images.isNotEmpty) ...[ + if (message.images.isNotEmpty) ...[ for (var imagePath in message.images) ...[ ClipRRect( borderRadius: BorderRadius.circular(8), @@ -143,7 +144,7 @@ class CopilotMessageBubble extends StatelessWidget { decoration: BoxDecoration(color: AppColor.background(context), shape: BoxShape.circle, border: Border.all(color: Colors.transparent)), child: "atoms_logo".toSvgAsset(width: 14, height: 14)), 8.width, - const InfoTextLabelWidget(label: "Atoms"), + const InfoTextLabelWidget(label: "BARQ"), // Text( // "Copilot", // overflow: TextOverflow.ellipsis, @@ -270,15 +271,11 @@ class CopilotMessageBubble extends StatelessWidget { selectable: true, onTapLink: (text, href, title) async { if (href == null || href.isEmpty) return; - - final uri = Uri.tryParse(href); - + String subS = href.substring(href.lastIndexOf("_") + 1, href.length); + String link = URLs.getFileUrl(subS)!; + final uri = Uri.tryParse(link); if (uri == null) return; - - await launchUrl( - uri, - mode: LaunchMode.externalApplication, - ); + await launchUrl(uri, mode: LaunchMode.externalApplication); }, styleSheet: MarkdownStyleSheet( p: AppTextStyles.bodyText2.copyWith(