improvements

main_production_copilot
Sikander Saleem 1 week ago
parent cd9d761212
commit 124156c6a9

@ -283,13 +283,16 @@ class _DashboardViewState extends State<DashboardView> {
bottom: 20.toScreenHeight,
child: Container(
padding: const EdgeInsets.all(0),
height: 60,
width: 60,
decoration: BoxDecoration(color: AppColor.background(context), shape: BoxShape.circle, border: Border.all(color: Colors.transparent)),
child: BorderBeam(
size: BeamSize.pulseInner,
colorVariant: BeamColorVariant.colorful,
reserveGlowSpace: false,
borderRadius: 35,
borderRadius: 50,
strength: 0.7,
child: "copilot_logo".toSvgAsset(width: 24, height: 24).paddingAll(16),
child: "atoms_logo".toSvgAsset().paddingAll(16),
),
).onPress(() {
context.read<CopilotProvider>().startNewConversation();

@ -362,7 +362,7 @@ class _ShimmerBubble extends StatelessWidget {
).toShimmer(context: context, isShow: true);
final name = Text(
isSender ? "Me" : "Assistant", //check the api if they send the user name
isSender ? "Me" : "Atoms", //check the api if they send the user name
style: AppTextStyles.bodyText.copyWith(color: AppColor.neutral50, fontWeight: FontWeight.w600),
).toShimmer(context: context, isShow: true);

@ -107,9 +107,9 @@ class CopilotMessageBubble extends StatelessWidget {
width: 36,
padding: const EdgeInsets.all(8),
decoration: BoxDecoration(color: AppColor.background(context), shape: BoxShape.circle, border: Border.all(color: Colors.transparent)),
child: "copilot_logo".toSvgAsset(width: 14, height: 14)),
child: "atoms_logo".toSvgAsset(width: 14, height: 14)),
8.width,
const InfoTextLabelWidget(label: "Assistant"),
const InfoTextLabelWidget(label: "Atoms"),
// Text(
// "Copilot",
// overflow: TextOverflow.ellipsis,
@ -205,35 +205,38 @@ class CopilotMessageBubble extends StatelessWidget {
(match) => '${match.group(1)} \n',
);
return MarkdownBody(
data: content,
selectable: true,
onTapLink: (text, href, title) async {
if (href == null || href.isEmpty) return;
return Directionality(
textDirection: context.settingProvider.isArabic ? TextDirection.rtl : TextDirection.ltr,
child: MarkdownBody(
data: content,
selectable: true,
onTapLink: (text, href, title) async {
if (href == null || href.isEmpty) return;
final uri = Uri.tryParse(href);
final uri = Uri.tryParse(href);
if (uri == null) return;
if (uri == null) return;
await launchUrl(
uri,
mode: LaunchMode.externalApplication,
);
},
styleSheet: MarkdownStyleSheet(
p: AppTextStyles.bodyText2.copyWith(
color: message.isError ? Colors.red : AppColor.textStyleColor(context),
),
strong: AppTextStyles.bodyText2.copyWith(
color: message.isError ? Colors.red : AppColor.textStyleColor(context),
fontWeight: FontWeight.bold,
),
listBullet: AppTextStyles.bodyText2.copyWith(
color: message.isError ? Colors.red : AppColor.textStyleColor(context),
),
a: AppTextStyles.bodyText2.copyWith(
color: AppColor.primary10,
decoration: TextDecoration.underline,
await launchUrl(
uri,
mode: LaunchMode.externalApplication,
);
},
styleSheet: MarkdownStyleSheet(
p: AppTextStyles.bodyText2.copyWith(
color: message.isError ? Colors.red : AppColor.textStyleColor(context),
),
strong: AppTextStyles.bodyText2.copyWith(
color: message.isError ? Colors.red : AppColor.textStyleColor(context),
fontWeight: FontWeight.bold,
),
listBullet: AppTextStyles.bodyText2.copyWith(
color: message.isError ? Colors.red : AppColor.textStyleColor(context),
),
a: AppTextStyles.bodyText2.copyWith(
color: AppColor.primary10,
decoration: TextDecoration.underline,
),
),
),
);

Loading…
Cancel
Save