-
Notifications
You must be signed in to change notification settings - Fork 792
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
feat: Full Markdown AI integration #4069
base: main
Are you sure you want to change the base?
Conversation
Review or Edit in CodeSandboxOpen the branch in Web Editor • VS Code • Insiders |
🦋 Changeset detectedLatest commit: 834b0b9 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@zbeyens @felixfeng33 Okay I saw what you guys meant earlier with the ai-menu not properly moving itself as needed and blinding the ai content. I drafted up this PR which includes my previous fix but would in theory update the useRef of the anchorNode once that content has been set. Unfortunately I seem unable to get any father as I would expect my code to work but my |
As solution could be to use the id supplying plugin and then use a standard call to find the node with the correct id but I was trying to avoid that. |
I also found a one line thing where some braces were missing in a call that should have expanded an object and made #4070 since this is still in development. |
Ok turns out I was being a little bit silly and didn't realize I wasn't giving the DOM enough time to update so the WeakMap literally couldn't contain values which hadn't been created yet. Anyways the latest commit has a fix for that however I am not super confident the way I made |
Also heres a video of the changes. Screen.Recording.2025-02-11.at.11.18.37.AM.mov |
Can you undo/redo the AI changes? |
@zbeyens Yes all ai changes are undone or redone with a single hit of the button. |
@felixfeng33 Ok looks like I left in a debugging thing but I took it out and that should stop the bar from going to the top left. Also, I was trying to minimize the number of calls to the markdown deserializer and was just keeping it to the last call in the end. But I could switch it to run after every chunk I just figured that may be expensive for little benefit. |
@supersimple33 Yes call deserializer in every chunk will make all things very tricky, but I think we should take a try. |
@felixfeng33 Ok so I tried a quick change to clear the aiNodes and reformat them every time but the trouble there is because of the speed at which chunks are loaded most of the time you fail to actually see what the editor is writing except for brief moments until the end when no more chunks are coming. I'm willing to investigate further but could we first get this merged and then I work on having it be updated continuously? |
This is a nice fix but it introduces a regression so we can't merge this right now. In the meantime you could use |
Addresses #4040 now with ui movement.
Checklist
yarn typecheck
yarn lint:fix
yarn test
yarn brl
yarn changeset