paradigmxyz/flux

feat: Automatically create a new node/tree when editing to preserve history

alexkreidler opened this issue · 1 comments

Is your feature request related to a problem? Please describe.
I've been using flux for a bit and just realized that when I edit a node in the "middle" of a tree, it overwrites the past version which generated its downstream nodes, so the chat view is inconsistent when looking from those downstream nodes, because the prompt that generated the response is different. I know that if I ctrl+z the history is still there, but I'm concerned that if I export the chat by copying to the clipboard, or via new functionality in #67, then it will be inaccurate.

Describe the solution you'd like
I'd like for edits to a node to simply duplicate the node, and make it a sibling of the original version. Then further paths can be explored without overwriting old ones.

Describe alternatives you've considered
This could be a configurable option in the settings modal.

while i get how this could be a little bit of a footgun, i think this is more of a feature than a bug. flux being a tool for pro users should allow you to do weird stuff like this (which does have legit use cases), even if its not fully baby proofed.

i don't think i'd like to change the default to fork the tree, as i often edit the past history to fit things within the context length while preserving model responses n such, but i would be open to a keybind that would quickly create a new sibling node with the same text content, allowing ppl to quickly fork the conversation if they wish to keep branches immutable