Skip to content

Commit 0570615

Browse files
committed
fix: #1975 Set a height limit for the AI prompt window where it displays the results
1 parent 609bf2a commit 0570615

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

frontend/appflowy_flutter/lib/plugins/document/presentation/plugins/openai/widgets/auto_completion_node_widget.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ class _AutoCompletionInputState extends State<_AutoCompletionInput> {
142142
TextSpan(
143143
children: [
144144
TextSpan(
145-
text: '${LocaleKeys.button_generate.tr()} ',
145+
text: LocaleKeys.button_generate.tr(),
146146
style: Theme.of(context).textTheme.bodyMedium,
147147
),
148148
],
@@ -154,7 +154,7 @@ class _AutoCompletionInputState extends State<_AutoCompletionInput> {
154154
TextSpan(
155155
children: [
156156
TextSpan(
157-
text: '${LocaleKeys.button_Cancel.tr()} ',
157+
text: LocaleKeys.button_Cancel.tr(),
158158
style: Theme.of(context).textTheme.bodyMedium,
159159
),
160160
],

frontend/appflowy_flutter/lib/plugins/document/presentation/plugins/openai/widgets/smart_edit_node_widget.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ class _SmartEditInputState extends State<_SmartEditInput> {
162162
TextSpan(
163163
children: [
164164
TextSpan(
165-
text: '${LocaleKeys.button_replace.tr()} ',
165+
text: LocaleKeys.button_replace.tr(),
166166
style: Theme.of(context).textTheme.bodyMedium,
167167
),
168168
],
@@ -177,7 +177,7 @@ class _SmartEditInputState extends State<_SmartEditInput> {
177177
TextSpan(
178178
children: [
179179
TextSpan(
180-
text: '${LocaleKeys.button_Cancel.tr()} ',
180+
text: LocaleKeys.button_Cancel.tr(),
181181
style: Theme.of(context).textTheme.bodyMedium,
182182
),
183183
],

frontend/appflowy_flutter/lib/plugins/document/presentation/plugins/openai/widgets/smart_edit_toolbar_item.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ ToolbarItem smartEditItem = ToolbarItem(
1616
validator: (editorState) {
1717
// All selected nodes must be text.
1818
final nodes = editorState.service.selectionService.currentSelectedNodes;
19-
return nodes.whereType<TextNode>().length == nodes.length;
19+
return nodes.whereType<TextNode>().length == nodes.length &&
20+
nodes.length == 1;
2021
},
2122
itemBuilder: (context, editorState) {
2223
return _SmartEditWidget(

0 commit comments

Comments
 (0)