Skip to content

Conversation

@Guikingone
Copy link
Contributor

Q A
Bug fix? no
New feature? yes
Docs? yes
Issues None
License MIT

Hi 👋🏻

This PR aims to introduce a new method fork via a custom interface (for message store and a custom method for the chat), this method aim to allow to "switch" between chats / messages like discussed in #254 with @welcoMattic, the logic behind is pretty much the same but allows to "create a new branch" in a chat and rollback to the primary one if needed (the main inspiration is the capability from "current chats like OpenAI" to create new conversations while fetching old messages).

As the Chat depends on the MessageStore implementation, a new method is added to stores using a new interface.

@Guikingone Guikingone changed the title [Chat] Support for chat "fork" [Chat] Introduce Chat::fork Dec 3, 2025
@OskarStark
Copy link
Contributor

open for finishing this PR?

@Guikingone
Copy link
Contributor Author

Yes, need to rebase it and finish the work, shouldn't be too long 🙂

@Guikingone Guikingone force-pushed the chat/fork branch 3 times, most recently from b7ae118 to 20a4270 Compare December 29, 2025 20:56
OskarStark added a commit that referenced this pull request Jan 5, 2026
This PR was merged into the main branch.

Discussion
----------

[Chat] Fix keys access for `Cloudflare`

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| Docs?         | no
| Issues        | Detected via #821
| License       | MIT

After the `reset`, if the element has the key `12`, the final array will keep it as it, need to reindex the array before returning it 😓

Commits
-------

6450054 ref
@Guikingone Guikingone changed the title [Chat] Introduce Chat::fork [Chat] Introduce Chat::fork and multi-session support Jan 6, 2026
@OskarStark
Copy link
Contributor

All bridges need to require ^0.2 of symfony/ai-chat

@Guikingone Guikingone force-pushed the chat/fork branch 5 times, most recently from 5a955ba to 32e6968 Compare January 9, 2026 18:24
@Guikingone Guikingone marked this pull request as ready for review January 9, 2026 18:24
@carsonbot carsonbot added Chat Issues & PRs about the AI Chat component Feature New feature Status: Needs Review labels Jan 9, 2026
@Guikingone
Copy link
Contributor Author

Hi @OskarStark @chr-hertel 👋🏻

I'm opening this PR for reviews as the CI errors are irrelevant for the review of the PR, I prefer to discuss the implementation before fixing the tests / static analysis, it would be easier to lock an implementation then fix the CI than the other way around 😅

I'm letting you reviewing it when you have time 🙂

@OskarStark
Copy link
Contributor

Wouldn't "clone" be more self explanatory? 🤔

@Guikingone
Copy link
Contributor Author

Agree but it's close to __clone(), I was tempted to call it copy or fork, don't have a final opinion on the method name to be honest 😅

@OskarStark
Copy link
Contributor

Branch() ?

@Guikingone
Copy link
Contributor Author

Hum, interesting, sounds like a git branch, make sense 🤔

@Guikingone Guikingone force-pushed the chat/fork branch 2 times, most recently from c4e93d8 to 3c56296 Compare January 12, 2026 17:12
@Guikingone Guikingone changed the title [Chat] Introduce Chat::fork and multi-session support [Chat] Introduce Chat::branch and multi-session support Jan 12, 2026
@Guikingone
Copy link
Contributor Author

Friendly ping @OskarStark, I'm facing a small issue when testing bridges, it looks like the composer install is linking symfony/ai-chat properly and using the latest version (0.2) but it looks like symfony/ai-platform is not linked properly (even when using 0.2):

Capture d’écran 2026-01-13 à 10 42 06

Any idea? 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Chat Issues & PRs about the AI Chat component Feature New feature Status: Needs Review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants