feat: add conversation branching (edit to fork) - #155
Conversation
|
This is a really great feature! Conversation branching makes the app much more powerful and flexible. Looking forward to trying it 👌 |
|
Thanks @mohammed-lahboub15 - appreciate it. I've also been working one NextCloud/OwnCloud sync, it still has a few things to resolve. I'll need to test it thoroughly, and makes some changes to the import/export function but I think will be a worthwhile addition. |
|
That sounds really exciting! Nextcloud/OwnCloud sync would be a fantastic feature, especially for users who prefer self-hosted and privacy-focused solutions. It would make Kai even more powerful. Looking forward to it — and thanks again for your great work! |
|
The branching brings a certain complexity which I try to postpone for now Tho I'm very interested in next cloud sync. Settings sync in general. Specifically sync implementations that rely on other services and don't require too many changes in Kai |
|
Understood @SimonSchubert . Would you consider a PR just for editing a message with no forking? It would be much simpler and fit 95% of use cases. |
|
Ability to edit messages would be a nice feature. On that note also, when the dynamic ui is enabled, the retry generation button and ability to click those buttons with the last output disappears usually. It would be nice if those interaction buttons still appeared even when dynamic ui elements appeared (this is outside of the full "Start Interactive UI" feature but simple the "Dynamic UI" option in settings). |
|
Great feedback! I agree — keeping retry and interaction buttons visible even with Dynamic UI enabled would improve the user experience a lot. It would be ideal to combine both: dynamic interfaces and persistent interaction controls. |
|
This exact thing has 2 projects sitting in Kai right now; where I have to figure out how to export the contents of the interactions, as the prompt fails to be scrollable from the response. They have been sitting waiting for ~ a week+ for me to take the time to figure it out. It provided buttons, drop down descriptions, and tabs for phases. The response from whatever the default model (What is it btw?) is had a great suggestion (really what I'm after as an 'finished' utility); yet, needed to be nearly a different project after the current intent; for future incorporation with a more matured deployment environment. |
Why
Sometimes, I want to go back and edit a message, but it's also nice to have forks of conversations. This is a common feature from most AI Chats, so it feels a welcome addition to Kai.
What
< X / Y >navigation between branches (below the branched message)Files Changed
Conversation.kt— AddedBranchDatafor branch persistenceDataRepository.kt— AddedBranchDirectionenum and interface methodsRemoteDataRepository.kt— Branch group management, serialization/deserializationChatUiState.kt— AddedbranchInfoto stateChatViewModel.kt—editMessagecallsask(null)for auto-responseChatScreen.kt— Inline branch navigation below user messagesUserMessage.kt— Added edit icon button (same pattern as bot message icons)EditMessageDialog.kt— New composable for editing messagesic_edit.xml— New edit icon drawableChatActions.kt— AddednavigateBranchandeditMessageFakeDataRepository.kt,ScreenshotTestData.kt— Test stubsTested
compileKotlinDesktop)