Adds buttons to clone chat from any point
Some rough code I made to create branches in JanitorAI.
I spruced it up a little with ChatGPT (please forgive me) because I write really ugly code when I'm doing a project on my own and I figured it should be legible in case someone wants to read it or make edits.
It may take a little bit of time to load the messages into the branch, but it shouldn't be too long (For my usage, seems to take about 0.5 - 1 seconds per message. I'll do some tests for how much of a delay I actually need in order to avoid being rate limited, but that's for later)