[GH-ISSUE #2092] [Bug] OpenAi replace does not work in certain use-cases #851

Closed
opened 2026-03-23 20:42:02 +00:00 by mirror · 2 comments
Owner

Originally created by @squidrye on GitHub (Mar 23, 2023).
Original GitHub issue: https://github.com/AppFlowy-IO/AppFlowy/issues/2092

Originally assigned to: @squidrye on GitHub.

Bug Description

As the title suggests, replace option when using OpenAi to generate a summary or fix-spelling does not work as expected in few use-cases, if response generated is multiline, last line overwrites the previous lines. This can cause much problem and confusion if user is working on large selections of text for correction or summary generation.

How to Reproduce

  1. Select some text on editor (likely a query to generate multiple lines from open ai)
  2. select summarize and then replace the selected text.

Expected Behavior

Selected text should be correctly replaced by the response generated by open-ai.

Operating System

Linux

AppFlowy Version(s)

Version 0.1.1 (1)

Screenshots

https://user-images.githubusercontent.com/84044317/227204772-9077f453-4994-41da-9618-5ae431cac55e.mp4

Additional Context

No response

Originally created by @squidrye on GitHub (Mar 23, 2023). Original GitHub issue: https://github.com/AppFlowy-IO/AppFlowy/issues/2092 Originally assigned to: @squidrye on GitHub. ### Bug Description As the title suggests, replace option when using OpenAi to generate a summary or fix-spelling does not work as expected in few use-cases, if response generated is multiline, last line overwrites the previous lines. This can cause much problem and confusion if user is working on large selections of text for correction or summary generation. ### How to Reproduce 1. Select some text on editor (likely a query to generate multiple lines from open ai) 2. select summarize and then replace the selected text. ### Expected Behavior Selected text should be correctly replaced by the response generated by open-ai. ### Operating System Linux ### AppFlowy Version(s) Version 0.1.1 (1) ### Screenshots https://user-images.githubusercontent.com/84044317/227204772-9077f453-4994-41da-9618-5ae431cac55e.mp4 ### Additional Context _No response_
mirror 2026-03-23 20:42:02 +00:00
Author
Owner

@squidrye commented on GitHub (Mar 23, 2023):

I have found the source of the issue and would like to resolve this, so that I can write some tests for this other issue I am working on.
#2059

<!-- gh-comment-id:1481119633 --> @squidrye commented on GitHub (Mar 23, 2023): I have found the source of the issue and would like to resolve this, so that I can write some tests for this other issue I am working on. #2059
Author
Owner

@annieappflowy commented on GitHub (Mar 23, 2023):

That's great! @LucasXu0 is relieved because someone already has a solution!

<!-- gh-comment-id:1481124392 --> @annieappflowy commented on GitHub (Mar 23, 2023): That's great! @LucasXu0 is relieved because someone already has a solution!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
AppFlowy-IO/AppFlowy#851
No description provided.