feat: implement dynamic theme palette selection
- Introduced a new feature allowing users to select from multiple accent color palettes for buttons, cards, and chat bubbles. - Added `AppThemePalette` provider to manage the current theme palette and persist user selections. - Updated the `AppTheme` class to utilize the selected palette for light and dark themes, enhancing visual customization. - Enhanced the `AppCustomizationPage` to include a palette selector, improving user experience and personalization options. - Updated localization files to support new palette selection UI elements in multiple languages.
This commit is contained in:
@@ -946,8 +946,7 @@ class _ChatPageState extends ConsumerState<ChatPage> {
|
||||
final greetingName = deriveUserDisplayName(user);
|
||||
return LayoutBuilder(
|
||||
builder: (context, constraints) {
|
||||
return SingleChildScrollView(
|
||||
physics: const AlwaysScrollableScrollPhysics(),
|
||||
return Padding(
|
||||
padding: const EdgeInsets.all(Spacing.lg),
|
||||
child: ConstrainedBox(
|
||||
constraints: BoxConstraints(minHeight: constraints.maxHeight),
|
||||
|
||||
@@ -115,6 +115,15 @@ class _AssistantMessageWidgetState extends ConsumerState<AssistantMessageWidget>
|
||||
_updateTypingIndicatorGate();
|
||||
}
|
||||
|
||||
// Update typing indicator gate when message properties that affect emptiness change
|
||||
if (oldWidget.message.statusHistory != widget.message.statusHistory ||
|
||||
oldWidget.message.files != widget.message.files ||
|
||||
oldWidget.message.attachmentIds != widget.message.attachmentIds ||
|
||||
oldWidget.message.followUps != widget.message.followUps ||
|
||||
oldWidget.message.codeExecutions != widget.message.codeExecutions) {
|
||||
_updateTypingIndicatorGate();
|
||||
}
|
||||
|
||||
// Rebuild cached avatar if model name or icon changes
|
||||
if (oldWidget.modelName != widget.modelName ||
|
||||
oldWidget.modelIconUrl != widget.modelIconUrl) {
|
||||
@@ -505,7 +514,17 @@ class _AssistantMessageWidgetState extends ConsumerState<AssistantMessageWidget>
|
||||
}
|
||||
|
||||
final hasCodeExecutions = widget.message.codeExecutions.isNotEmpty;
|
||||
return !hasCodeExecutions;
|
||||
if (hasCodeExecutions) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Check for tool calls in the content using ToolCallsParser
|
||||
final hasToolCalls =
|
||||
ToolCallsParser.segments(
|
||||
content,
|
||||
)?.any((segment) => segment.isToolCall) ??
|
||||
false;
|
||||
return !hasToolCalls;
|
||||
}
|
||||
|
||||
void _buildCachedAvatar() {
|
||||
|
||||
Reference in New Issue
Block a user