mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-01-28 21:26:13 +01:00
✨ feat: Implement Conversation Duplication & UI Improvements (#5036)
* feat(ui): enhance conversation components and add duplication - feat: add conversation duplication functionality - fix: resolve OGDialogTemplate display issues - style: improve mobile dropdown component design - chore: standardize shared link title formatting * style: update active item background color in select-item * feat(conversation): add duplicate conversation functionality and UI integration * feat(conversation): enable title renaming on double-click and improve input focus styles * fix(conversation): remove "(Copy)" suffix from duplicated conversation title in logging * fix(RevokeKeysButton): correct className duration property for smoother transitions * refactor(conversation): ensure proper parent-child relationships and timestamps when message cloning --------- Co-authored-by: Marco Beretta <81851188+berry-13@users.noreply.github.com>
This commit is contained in:
parent
649c7a6032
commit
e8bde332c2
24 changed files with 717 additions and 85 deletions
|
|
@ -50,6 +50,8 @@ export const importConversation = () => `${conversationsRoot}/import`;
|
|||
|
||||
export const forkConversation = () => `${conversationsRoot}/fork`;
|
||||
|
||||
export const duplicateConversation = () => `${conversationsRoot}/duplicate`;
|
||||
|
||||
export const search = (q: string, pageNumber: string) =>
|
||||
`/api/search?q=${q}&pageNumber=${pageNumber}`;
|
||||
|
||||
|
|
|
|||
|
|
@ -569,6 +569,12 @@ export const getCustomConfigSpeech = (): Promise<t.TCustomConfigSpeechResponse>
|
|||
|
||||
/* conversations */
|
||||
|
||||
export function duplicateConversation(
|
||||
payload: t.TDuplicateConvoRequest,
|
||||
): Promise<t.TDuplicateConvoResponse> {
|
||||
return request.post(endpoints.duplicateConversation(), payload);
|
||||
}
|
||||
|
||||
export function forkConversation(payload: t.TForkConvoRequest): Promise<t.TForkConvoResponse> {
|
||||
return request.post(endpoints.forkConversation(), payload);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -201,6 +201,15 @@ export type TTagConversationRequest = {
|
|||
};
|
||||
export type TTagConversationResponse = string[];
|
||||
|
||||
export type TDuplicateConvoRequest = {
|
||||
conversationId?: string;
|
||||
};
|
||||
|
||||
export type TDuplicateConvoResponse = {
|
||||
conversation: TConversation;
|
||||
messages: TMessage[];
|
||||
} | undefined;
|
||||
|
||||
export type TForkConvoRequest = {
|
||||
messageId: string;
|
||||
conversationId: string;
|
||||
|
|
|
|||
|
|
@ -159,6 +159,11 @@ export type DeleteConversationOptions = MutationOptions<
|
|||
types.TDeleteConversationRequest
|
||||
>;
|
||||
|
||||
export type DuplicateConvoOptions = MutationOptions<
|
||||
types.TDuplicateConvoResponse,
|
||||
types.TDuplicateConvoRequest
|
||||
>;
|
||||
|
||||
export type ForkConvoOptions = MutationOptions<types.TForkConvoResponse, types.TForkConvoRequest>;
|
||||
|
||||
export type CreateSharedLinkOptions = MutationOptions<
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue