coleam00 / bolt.new-any-llm

Prompt, run, edit, and deploy full-stack web applications using any LLM you want!
https://bolt.new
MIT License
3.89k stars 1.59k forks source link

(Ready for review and merge) Add Chat Rewind, Duplicate, and Fork Features #305

Closed wonderwhy-er closed 2 days ago

wonderwhy-er commented 5 days ago

Video

https://github.com/user-attachments/assets/72d216f5-0db3-415c-978e-dd8d14175239

Summary

This PR introduces several new features:


Dependency Updates

lassecapel commented 5 days ago

There was a discussion about a feature like this earlier: https://github.com/coleam00/bolt.new-any-llm/pull/114 the proposal was to use isomorphic-git. But that requires a browserFS. This approch doesn't add to much overhead and makes it easy to move back in time. Although what happens when you make changes, the downstream chat messages are not aware of that, Or am I wrong?

wonderwhy-er commented 5 days ago

There was a discussion about a feature like this earlier: #114 the proposal was to use isomorphic-git. But that requires a browserFS. This approch doesn't add to much overhead and makes it easy to move back in time. Although what happens when you make changes, the downstream chat messages are not aware of that, Or am I wrong?

Currently downstream chats will be overwritten after you make a new chat message call.

As for referenced PR. It does way more and differently, and I am not sure AI is aware of those manipulations, I don't see it changing messages. In that sense proposal here seems to be more in line with how Bolt.New works, is smaller and more elegant in that way.

But does not yet do anything to import/export to git.

Digitl-Alchemyst commented 4 days ago

This is super clean code-wise. It appears to be super light weight, especially compared to the other method mentioned, which relied on a whole lot of state manipulation. I never tested the other method, but just looking at it, it seemed too slow.

My only complaint on this interaction of the idea is your icon choice. even though its facing the other direction it still feels like a refresh/reload icon I think something closer to what the OG bolt has would be more intuitive either with the shape of the icon, theirs has more of a turn vibe to it, or even doing a button that just says rewind or rewind to here image My thoughts are some users maybe confused about what the button does.

Digitl-Alchemyst commented 4 days ago

I was also looking at this one this morning https://github.com/coleam00/bolt.new-any-llm/pull/280 While these 2 features are slightly different, I see the potential for overlap. If you want also to compare these 2 for functionality conflicts

I see them both as powerful features that will likely get merged in pretty quick.

wonderwhy-er commented 4 days ago

@Digitl-Alchemyst thanks for feedback, I will take a look at better icon and hint on hover.

I will be adding few more things after discussion in community. Duplicate in of chats in side bar. And ability to fork from any message which allows to start a new chat with copy of current chat up to a message.

chrismahoney commented 2 days ago

This is really clean and good. Just one point to note, there's an existing issue I'm not sure we've captured where a revisited chat doesn't behave like the first run: For React at least, first run generates package.json and will not run the npm install until it's complete. On revisit, it doesn't care and runs both in tandem; in that case the install step always fails.

More making a note for myself, that isn't related to this change so I think this is worth bringing in for now. I'll look for/create an issue related to that behavior shortly.

👍 from me to merge

wonderwhy-er commented 2 days ago

Ok, merging then And yeah, there are issues to fix, many :)

dhairya13703 commented 1 day ago

Hey @wonderwhy-er
I'm having trouble with chat history storage when running the application with pnpm start or docker run. I'm unsure if the issue lies with the code or Wrangler configuration. image

wonderwhy-er commented 1 day ago

Hey @wonderwhy-er I'm having trouble with chat history storage...

You did not describe the issue, chat history is gone when you restart server?

dhairya13703 commented 1 day ago

Hey @wonderwhy-er I'm having trouble with chat history storage...

You did not describe the issue, chat history is gone when you restart server?

No it is running without any restart.

wonderwhy-er commented 1 day ago

Weird, works fine for me in hosted variant https://ottodev-bolt.myaibuilt.app/

Are you using cancary or may be incognito?

dhairya13703 commented 1 day ago

No I am deploying with docker on coolify. You have deployed with cloudflare pages? My code - https://github.com/dhairya13703/bolt.new-any-llm I am not using incognito.