mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-01-28 21:26:13 +01:00
* typedef for ImportBatchBuilder * feat: first pass, fork conversations * feat: fork - getMessagesUpToTargetLevel * fix: additional tests and fix getAllMessagesUpToParent * chore: arrow function return * refactor: fork 3 options * chore: remove unused genbuttons * chore: remove unused hover buttons code * feat: fork first pass * wip: fork remember setting * style: user icon * chore: move clear chats to data tab * WIP: fork UI options * feat: data-provider fork types/services/vars and use generic MutationOptions * refactor: use single param for fork option, use enum, fix mongo errors, use Date.now(), add records flag for testing, use endpoint from original convo and messages, pass originalConvo to finishConversation * feat: add fork mutation hook and consolidate type imports * refactor: use enum * feat: first pass, fork mutation * chore: add enum for target level fork option * chore: add enum for target level fork option * show toast when checking remember selection * feat: splitAtTarget * feat: split at target option * feat: navigate to new fork, show toasts, set result query data * feat: hover info for all fork options * refactor: add Messages settings tab * fix(Fork): remember text info * ci: test for single message and is target edge case * feat: additional tests for getAllMessagesUpToParent * ci: additional tests and cycle detection for getMessagesUpToTargetLevel * feat: circular dependency checks for getAllMessagesUpToParent * fix: getMessagesUpToTargetLevel circular dep. check * ci: more tests for getMessagesForConversation * style: hover text for checkbox fork items * refactor: add statefulness to conversation import
29 lines
751 B
TypeScript
29 lines
751 B
TypeScript
import type { TDangerButtonProps } from '~/common';
|
|
import DangerButton from '../DangerButton';
|
|
|
|
export const ClearChatsButton = ({
|
|
confirmClear,
|
|
className = '',
|
|
showText = true,
|
|
mutation,
|
|
onClick,
|
|
}: Pick<
|
|
TDangerButtonProps,
|
|
'confirmClear' | 'mutation' | 'className' | 'showText' | 'onClick'
|
|
>) => {
|
|
return (
|
|
<DangerButton
|
|
id="clearConvosBtn"
|
|
mutation={mutation}
|
|
confirmClear={confirmClear}
|
|
className={className}
|
|
showText={showText}
|
|
infoTextCode="com_nav_clear_all_chats"
|
|
actionTextCode="com_ui_clear"
|
|
confirmActionTextCode="com_nav_confirm_clear"
|
|
dataTestIdInitial="clear-convos-initial"
|
|
dataTestIdConfirm="clear-convos-confirm"
|
|
onClick={onClick}
|
|
/>
|
|
);
|
|
};
|