Skip to content

Bring projects, wikis, and teams together with AI. AppFlowy is the AI collaborative workspace where you achieve more without losing control of your data. The leading open source Notion alternative.

chore: regenerate

Richard Shiue75dd5c1d93dd
diff --git a/frontend/appflowy_flutter/lib/plugins/ai_chat/presentation/message/ai_message_action_bar.dart b/frontend/appflowy_flutter/lib/plugins/ai_chat/presentation/message/ai_message_action_bar.dart
index 48a8459598..6b1d428d04 100644
--- a/frontend/appflowy_flutter/lib/plugins/ai_chat/presentation/message/ai_message_action_bar.dart
+++ b/frontend/appflowy_flutter/lib/plugins/ai_chat/presentation/message/ai_message_action_bar.dart
@@ -260,8 +260,11 @@ class _ChangeFormatButtonState extends State<ChangeFormatButton> {
constraints: const BoxConstraints(),
onClose: () => widget.onOverrideVisibility?.call(false),
child: buildButton(context),
- popupBuilder: (_) => _ChangeFormatPopoverContent(
- onRegenerate: widget.onRegenerate,
+ popupBuilder: (_) => BlocProvider.value(
+ value: context.read<AIPromptInputBloc>(),
+ child: _ChangeFormatPopoverContent(
+ onRegenerate: widget.onRegenerate,
+ ),
),
);
}
@@ -359,11 +362,16 @@ class _ChangeFormatPopoverContentState
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
- ChangeFormatBar(
- spacing: 2.0,
- predefinedFormat: predefinedFormat,
- onSelectPredefinedFormat: (format) {
- setState(() => predefinedFormat = format);
+ BlocBuilder<AIPromptInputBloc, AIPromptInputState>(
+ builder: (context, state) {
+ return ChangeFormatBar(
+ spacing: 2.0,
+ showImageFormats: state.aiType.isCloud,
+ predefinedFormat: predefinedFormat,
+ onSelectPredefinedFormat: (format) {
+ setState(() => predefinedFormat = format);
+ },
+ );
},
),
const HSpace(4.0),