Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ feat: Implement Conversation Duplication & UI Improvements #5011

Closed
wants to merge 4 commits into from

Conversation

berry-13
Copy link
Collaborator

@berry-13 berry-13 commented Dec 16, 2024

Summary

This pull request introduces several new features and improvements, including the ability to duplicate conversations, enhancements to UI components, and code refactoring for better readability and consistency. The most important changes are summarized below:

New Features:

  • Added the ability to duplicate conversations, including a new endpoint and UI integration for duplicating conversations. (api/server/routes/convos.js, api/server/utils/import/fork.js, client/src/components/Conversations/ConvoOptions/ConvoOptions.tsx) [1] [2] [3] [4] [5]

UI Enhancements:

  • Improved the visual consistency of several UI components by refining class names and styles. (client/src/components/Chat/Input/Files/AttachFileMenu.tsx, client/src/components/Conversations/Convo.tsx, client/src/components/Conversations/ConvoOptions/SharedLinkButton.tsx, client/src/components/Nav/SettingsTabs/Data/RevokeKeysButton.tsx) [1] [2] [3] [4] [5]

Code Refactoring:

  • Refactored code to improve readability and maintainability, such as consolidating imports and adjusting formatting. (client/src/components/Conversations/ConvoOptions/ConvoOptions.tsx, client/src/components/ui/Dropdown.tsx, client/src/components/ui/DropdownPopup.tsx) [1] [2] [3] [4] [5]

Bug Fixes:

  • Fixed minor issues related to logging and error handling to ensure more accurate and informative error messages. (api/server/routes/convos.js)
  • Fixed minor issues releated to ConvoOptions being visibile when renaming (client/src/components/Conversations/Convo.tsx)

Other Minor Changes:

  • Added missing semicolons and adjusted import statements for consistency. (client/src/components/Conversations/Convo.tsx, client/src/components/Conversations/ConvoOptions/SharedLinkButton.tsx) [1] [2]

Change Type

  • New feature (non-breaking change which adds functionality)

Checklist

  • My code adheres to this project's style guidelines
  • I have performed a self-review of my own code
  • I have commented in any complex areas of my code
  • I have made pertinent documentation changes
  • My changes do not introduce new warnings
  • I have written tests demonstrating that my changes are effective or that my feature works
  • Local unit tests pass with my changes
  • Any changes dependent on mine have been merged and published in downstream modules.
  • A pull request for updating the documentation has been submitted.

- feat: add conversation duplication functionality
- fix: resolve OGDialogTemplate display issues
- style: improve mobile dropdown component design
- chore: standardize shared link title formatting
import * as Ariakit from '@ariakit/react';
import { Ellipsis, Share2, Archive, Pen, Trash } from 'lucide-react';
import * as Menu from '@ariakit/react/menu';
import { ForkOptions } from 'librechat-data-provider';
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unused import, fixing this

@@ -390,6 +393,7 @@ export default {
'Are you sure you want to delete this Assistant? This cannot be undone.',
com_ui_rename: 'Rename',
com_ui_archive: 'Archive',
com_ui_duplicate: 'Duplicate',
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"duplicate" localization key here when rebasing

@@ -573,6 +573,39 @@ export const useDeleteConversationMutation = (
);
};

export const useDuplicateConversationMutation = (
options?: t.DeleteConversationOptions,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DeleteConversationOptions is mistakenly used here

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also types do not reflect usage, had to be fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants