by bhl · 2y ago · 0 comments
Instead of replacing the entire document or selection, we want it to create diffs or operations for the minimal amount of edits as possible. This helps preserve intent better when merging the doc later on with OT/CRDTs. (Of course, you could also ask GPT to semantically merge docs for you haha).
So far, it's been harder than plain text or spreadsheets which have an easier position/coordinate system to work with: just line-col or row-col.
Rich text is usually stored as trees with json or html. Have seen a paper (https://www.inkandswitch.com/peritext/) that represents it as a flat array.
Difference in approach would then be: is it easier for gpt to work with diffs or with operations/tool calls?
You can check out the GitHub repository here: https://github.com/isaksamsten/sia.nvim.
I also have a few screen recordings showing its capabilities. I’ve been using it for about six months to enhance my writing.
The plugin leverages a language model to suggest text improvements, features a split-view interface, and allows users to select the edits they want to keep from a diff.
It’s still a bit rough around the edges, and the code is quite messy since I’m still learning Lua and the Neovim API. However, I’m gradually improving it whenever I find the time.
LLMs will then have a set of these components to dynamically route and build interfaces with.
Component libraries are already popular and more time will be spent inside of them than managing the glue that is outside.