diff --git a/lib/features/chat/widgets/assistant_message_widget.dart b/lib/features/chat/widgets/assistant_message_widget.dart index 4d9718b..93b9ead 100644 --- a/lib/features/chat/widgets/assistant_message_widget.dart +++ b/lib/features/chat/widgets/assistant_message_widget.dart @@ -420,7 +420,7 @@ class _AssistantMessageWidgetState extends ConsumerState ? Icons.keyboard_arrow_up_rounded : Icons.keyboard_arrow_down_rounded, size: 14, - color: theme.textSecondary, + color: theme.textPrimary.withValues(alpha: 0.8), ), const SizedBox(width: 2), Flexible( @@ -429,7 +429,7 @@ class _AssistantMessageWidgetState extends ConsumerState overflow: TextOverflow.ellipsis, style: TextStyle( fontSize: AppTypography.bodySmall, - color: theme.textSecondary, + color: theme.textPrimary.withValues(alpha: 0.8), height: 1.3, ), ), @@ -518,6 +518,7 @@ class _AssistantMessageWidgetState extends ConsumerState Widget _buildSegmentedContent() { final children = []; bool firstToolSpacerAdded = false; + bool hasNonTextSegment = false; int idx = 0; for (final seg in _segments) { if (seg.isTool && seg.toolCall != null) { @@ -527,9 +528,16 @@ class _AssistantMessageWidgetState extends ConsumerState firstToolSpacerAdded = true; } children.add(_buildToolCallTile(seg.toolCall!)); + hasNonTextSegment = true; } else if (seg.isReasoning && seg.reasoning != null) { children.add(_buildReasoningTile(seg.reasoning!, idx)); + hasNonTextSegment = true; } else if ((seg.text ?? '').trim().isNotEmpty) { + // Add spacing before text content if it follows non-text segments + if (hasNonTextSegment) { + children.add(const SizedBox(height: Spacing.sm)); + hasNonTextSegment = false; + } children.add(_buildEnhancedMarkdownContent(seg.text!)); } idx++; @@ -1342,7 +1350,7 @@ class _AssistantMessageWidgetState extends ConsumerState ? Icons.keyboard_arrow_up_rounded : Icons.keyboard_arrow_down_rounded, size: 14, - color: theme.textSecondary, + color: theme.textPrimary.withValues(alpha: 0.8), ), const SizedBox(width: 2), Flexible( @@ -1351,7 +1359,7 @@ class _AssistantMessageWidgetState extends ConsumerState overflow: TextOverflow.ellipsis, style: TextStyle( fontSize: AppTypography.bodySmall, - color: theme.textSecondary, + color: theme.textPrimary.withValues(alpha: 0.8), height: 1.3, ), ), diff --git a/lib/features/chat/widgets/sources/openwebui_sources.dart b/lib/features/chat/widgets/sources/openwebui_sources.dart index 6992fe2..72bc4e0 100644 --- a/lib/features/chat/widgets/sources/openwebui_sources.dart +++ b/lib/features/chat/widgets/sources/openwebui_sources.dart @@ -68,8 +68,8 @@ class _OpenWebUISourcesWidgetState extends State { splashColor: theme.surfaceContainer.withValues(alpha: 0.2), child: Container( padding: const EdgeInsets.symmetric( - horizontal: 14, - vertical: 8, + horizontal: 10, + vertical: 5, ), decoration: BoxDecoration( borderRadius: BorderRadius.circular(20), diff --git a/lib/features/chat/widgets/streaming_status_widget.dart b/lib/features/chat/widgets/streaming_status_widget.dart index 327fb1e..d966eda 100644 --- a/lib/features/chat/widgets/streaming_status_widget.dart +++ b/lib/features/chat/widgets/streaming_status_widget.dart @@ -137,7 +137,7 @@ class _MinimalStatusRow extends StatelessWidget { ? Icons.keyboard_arrow_up_rounded : Icons.keyboard_arrow_down_rounded, size: 14, - color: theme.textSecondary, + color: theme.textPrimary.withValues(alpha: 0.8), ), const SizedBox(width: 2), ], @@ -166,9 +166,10 @@ class _MinimalStatusRow extends StatelessWidget { bool isPending, ) { final theme = context.conduitTheme; + final baseColor = theme.textPrimary.withValues(alpha: 0.8); final baseStyle = TextStyle( fontSize: AppTypography.bodySmall, - color: theme.textSecondary, + color: baseColor, height: 1.3, ); @@ -184,7 +185,7 @@ class _MinimalStatusRow extends StatelessWidget { return Text( description, style: baseStyle.copyWith( - color: theme.textSecondary.withValues(alpha: opacity), + color: baseColor.withValues(alpha: opacity), ), maxLines: 1, ); @@ -288,9 +289,10 @@ class _MinimalHistoryTimeline extends StatelessWidget { bool isPending, ) { final theme = context.conduitTheme; + final baseColor = theme.textPrimary.withValues(alpha: 0.8); final baseStyle = TextStyle( fontSize: AppTypography.bodySmall, - color: theme.textSecondary, + color: baseColor, height: 1.3, ); @@ -305,7 +307,7 @@ class _MinimalHistoryTimeline extends StatelessWidget { return Text( description, style: baseStyle.copyWith( - color: theme.textSecondary.withValues(alpha: opacity), + color: baseColor.withValues(alpha: opacity), ), ); },