Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: open-ai replace does not work in certain use-cases #2100

Merged
merged 8 commits into from
Mar 27, 2023
Merged

fix: open-ai replace does not work in certain use-cases #2100

merged 8 commits into from
Mar 27, 2023

Conversation

squidrye
Copy link
Contributor

Replacing lesser number of available multi-line text nodes with higher number of incoming multi-line nodes lead to inconsistencies such as overwriting and unexpected line skips, this PR fixes the issue.

fixes #2092

@squidrye squidrye requested a review from LucasXu0 March 24, 2023 03:16
@LucasXu0
Copy link
Collaborator

Hey, @squidrye. I reimplement some parts of your code and formatted the code. Please take a look. 6b13358

@LucasXu0 LucasXu0 merged commit f9a1cb2 into AppFlowy-IO:main Mar 27, 2023
@annieappflowy annieappflowy added bug Something isn't working editor features related to the rich-text editor AI features built on top of artificial intelligence technology labels Mar 27, 2023
@annieappflowy annieappflowy added this to the v0.1.2 milestone Mar 27, 2023
thanhquang1988 pushed a commit to thanhquang1988/AppFlowy that referenced this pull request Mar 31, 2023
…2100)

* test: added test to verify correct ordering after replacement of multiline text-nodes

* fix: open-ai replace does not work on certain use-cases

* refactor: using predefined operation insert node to create new nodes.

* Revert "refactor: using predefined operation insert node to create new nodes."

This reverts commit bcc014e.

* refactor: using predefined operation insert node to create new nodes.

* fix: open-ai replace does not work in certain use-cases

* fix: fixed logic and tests for replacement of larger textNodes with smaller text.

---------

Co-authored-by: Lucas.Xu <lucas.xu@appflowy.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AI features built on top of artificial intelligence technology bug Something isn't working editor features related to the rich-text editor
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

[Bug] OpenAi replace does not work in certain use-cases
3 participants