Skip to content

Enhanced ChatGPT Clone: Features Agents, MCP, Skills, DeepSeek, Anthropic, AWS, OpenAI, Responses API, Azure, Groq, o1, GPT-5, Mistral, OpenRouter, Vertex AI, Gemini, Artifacts, AI model switching, message search, Code Interpreter, langchain, DALL-E-3, OpenAPI Actions, Functions, Secure Multi-User Auth, Presets, open-source for self-hosting. Active

🧭 refactor: Move App-Only Conversation and Sharing Hooks Out of hooks/Chat- #17108 (#17108)

Marco Berettaaadb20952e60
diff --git a/client/src/components/Chat/AddMultiConvo.tsx b/client/src/components/Chat/AddMultiConvo.tsx
index cdc9663192..2127b2ed43 100644
--- a/client/src/components/Chat/AddMultiConvo.tsx
+++ b/client/src/components/Chat/AddMultiConvo.tsx
@@ -1,6 +1,6 @@
import { PlusCircle } from 'lucide-react';
import { Button, TooltipAnchor } from '@librechat/client';
-import useMultiConvo from '~/hooks/Chat/useMultiConvo';
+import useMultiConvo from '~/hooks/Conversations/useMultiConvo';
import { useLocalize } from '~/hooks';
function AddMultiConvo() {
diff --git a/client/src/components/Chat/ExportAndShareMenu.tsx b/client/src/components/Chat/ExportAndShareMenu.tsx
index e0a2fc5f8c..a44e349e68 100644
--- a/client/src/components/Chat/ExportAndShareMenu.tsx
+++ b/client/src/components/Chat/ExportAndShareMenu.tsx
@@ -2,7 +2,7 @@ import { useState, useId } from 'react';
import { Ellipsis } from 'lucide-react';
import * as Ariakit from '@ariakit/react';
import { DropdownPopup, TooltipAnchor, useMediaQuery } from '@librechat/client';
-import useChatOptions from '~/hooks/Chat/useChatOptions';
+import useChatOptions from '~/hooks/Sharing/useChatOptions';
import { useLocalize } from '~/hooks';
export default function ExportAndShareMenu({
diff --git a/client/src/components/Chat/Menus/BookmarkMenu.tsx b/client/src/components/Chat/Menus/BookmarkMenu.tsx
index f3e6ee504c..86f038b6fc 100644
--- a/client/src/components/Chat/Menus/BookmarkMenu.tsx
+++ b/client/src/components/Chat/Menus/BookmarkMenu.tsx
@@ -4,8 +4,8 @@ import * as Ariakit from '@ariakit/react';
import { BookmarkFilledIcon, BookmarkIcon } from '@radix-ui/react-icons';
import { DropdownPopup, TooltipAnchor, Spinner } from '@librechat/client';
import type { FC } from 'react';
+import useBookmarkItems from '~/hooks/Sharing/useBookmarkItems';
import { BookmarkContext } from '~/Providers/BookmarkContext';
-import useBookmarkItems from '~/hooks/Chat/useBookmarkItems';
import { useLocalize } from '~/hooks';
import { cn } from '~/utils';
import store from '~/store';
diff --git a/client/src/components/Chat/Menus/HeaderMenu.tsx b/client/src/components/Chat/Menus/HeaderMenu.tsx
index f5f5dbb389..c83e1becfd 100644
--- a/client/src/components/Chat/Menus/HeaderMenu.tsx
+++ b/client/src/components/Chat/Menus/HeaderMenu.tsx
@@ -7,12 +7,12 @@ import { Ellipsis, PlusCircle, HatGlasses, Check, ChartNoAxesGantt } from 'lucid
import type { TStartupConfig } from 'librechat-data-provider';
import type { TraceControl } from '~/components/Chat/Trace';
import type * as t from '~/common';
+import useTemporaryChat from '~/hooks/Conversations/useTemporaryChat';
import { usePullRequestMenu } from '~/components/Chat/PullRequest';
+import useBookmarkItems from '~/hooks/Sharing/useBookmarkItems';
+import useMultiConvo from '~/hooks/Conversations/useMultiConvo';
import { BookmarkContext } from '~/Providers/BookmarkContext';
-import useBookmarkItems from '~/hooks/Chat/useBookmarkItems';
-import useTemporaryChat from '~/hooks/Chat/useTemporaryChat';
-import useChatOptions from '~/hooks/Chat/useChatOptions';
-import useMultiConvo from '~/hooks/Chat/useMultiConvo';
+import useChatOptions from '~/hooks/Sharing/useChatOptions';
import { useHasAccess, useLocalize } from '~/hooks';
import { cn } from '~/utils';
diff --git a/client/src/components/Chat/Menus/NewChat.tsx b/client/src/components/Chat/Menus/NewChat.tsx
index 526a59ed0c..240a1c726f 100644
--- a/client/src/components/Chat/Menus/NewChat.tsx
+++ b/client/src/components/Chat/Menus/NewChat.tsx
@@ -1,6 +1,6 @@
import { TooltipAnchor, NewChatIcon, Button } from '@librechat/client';
import { useShortcutAriaKey, useShortcutHint } from '~/hooks/useKeyboardShortcuts';
-import useNewChat from '~/hooks/Chat/useNewChat';
+import useNewChat from '~/hooks/Conversations/useNewChat';
import { useLocalize } from '~/hooks';
import { cn } from '~/utils';
diff --git a/client/src/components/Chat/Menus/__tests__/HeaderMenu.spec.tsx b/client/src/components/Chat/Menus/__tests__/HeaderMenu.spec.tsx
index 399a9453fc..19e9887457 100644
--- a/client/src/components/Chat/Menus/__tests__/HeaderMenu.spec.tsx
+++ b/client/src/components/Chat/Menus/__tests__/HeaderMenu.spec.tsx
@@ -40,22 +40,22 @@ jest.mock('~/components/Chat/PullRequest', () => ({
return mockHookState.pullRequest;
},
}));
-jest.mock('~/hooks/Chat/useMultiConvo', () => ({
+jest.mock('~/hooks/Conversations/useMultiConvo', () => ({
__esModule: true,
default: () => mockHookState.multiConvo,
}));
-jest.mock('~/hooks/Chat/useTemporaryChat', () => ({
+jest.mock('~/hooks/Conversations/useTemporaryChat', () => ({
__esModule: true,
default: () => mockHookState.temporary,
}));
-jest.mock('~/hooks/Chat/useBookmarkItems', () => ({
+jest.mock('~/hooks/Sharing/useBookmarkItems', () => ({
__esModule: true,
default: (args: { enabled?: boolean } = {}) => {
mockBookmarkArgs.push(args);
return mockHookState.bookmarks;
},
}));
-jest.mock('~/hooks/Chat/useChatOptions', () => ({
+jest.mock('~/hooks/Sharing/useChatOptions', () => ({
__esModule: true,
default: () => mockHookState.exportShare,
}));
diff --git a/client/src/components/Chat/Messages/Content/EditContentParts.tsx b/client/src/components/Chat/Messages/Content/EditContentParts.tsx
index 0f25001a0e..5399d642fb 100644
--- a/client/src/components/Chat/Messages/Content/EditContentParts.tsx
+++ b/client/src/components/Chat/Messages/Content/EditContentParts.tsx
@@ -11,8 +11,8 @@ import type { TMessageContentParts } from 'librechat-data-provider';
import type { ReactNode } from 'react';
import { useMessagesConversation, useMessagesOperations } from '~/Providers';
import { getPartText, isEditablePart, withPartText } from './editableParts';
+import useGetAddedConvo from '~/hooks/Conversations/useGetAddedConvo';
import { findRerunParent } from './rerunParent';
-import { useGetAddedConvo } from '~/hooks/Chat';
import { useLocalize } from '~/hooks';
import { cn } from '~/utils';
import store from '~/store';
diff --git a/client/src/components/Chat/Messages/Content/EditMessage.tsx b/client/src/components/Chat/Messages/Content/EditMessage.tsx
index 1c9c397f5e..2eaaca440a 100644
--- a/client/src/components/Chat/Messages/Content/EditMessage.tsx
+++ b/client/src/components/Chat/Messages/Content/EditMessage.tsx
@@ -5,9 +5,9 @@ import { Alert, Button, TextareaAutosize } from '@librechat/client';
import { useUpdateMessageMutation } from 'librechat-data-provider/react-query';
import type { TEditProps } from '~/common';
import { useMessagesOperations, useMessagesConversation } from '~/Providers';
+import useGetAddedConvo from '~/hooks/Conversations/useGetAddedConvo';
import { cn, isSubmittableMessage } from '~/utils';
import { findRerunParent } from './rerunParent';
-import { useGetAddedConvo } from '~/hooks/Chat';
import { useLocalize } from '~/hooks';
import Container from './Container';
import EditFiles from './EditFiles';
diff --git a/client/src/components/Chat/Messages/Content/__tests__/EditContentParts.spec.tsx b/client/src/components/Chat/Messages/Content/__tests__/EditContentParts.spec.tsx
index 264066978a..9d7b9970ea 100644
--- a/client/src/components/Chat/Messages/Content/__tests__/EditContentParts.spec.tsx
+++ b/client/src/components/Chat/Messages/Content/__tests__/EditContentParts.spec.tsx
@@ -57,8 +57,9 @@ jest.mock('~/hooks', () => ({
useLocalize: () => (key: string) => key,
}));
-jest.mock('~/hooks/Chat', () => ({
- useGetAddedConvo: () => () => null,
+jest.mock('~/hooks/Conversations/useGetAddedConvo', () => ({
+ __esModule: true,
+ default: () => () => null,
}));
const content = [
diff --git a/client/src/components/Chat/Messages/Content/__tests__/EditMessage.spec.tsx b/client/src/components/Chat/Messages/Content/__tests__/EditMessage.spec.tsx
index 5bb6761a25..06348c7aba 100644
--- a/client/src/components/Chat/Messages/Content/__tests__/EditMessage.spec.tsx
+++ b/client/src/components/Chat/Messages/Content/__tests__/EditMessage.spec.tsx
@@ -39,8 +39,9 @@ jest.mock('~/hooks', () => ({
useLocalize: () => (key: string) => key,
}));
-jest.mock('~/hooks/Chat', () => ({
- useGetAddedConvo: () => () => null,
+jest.mock('~/hooks/Conversations/useGetAddedConvo', () => ({
+ __esModule: true,
+ default: () => () => null,
}));
jest.mock('../Container', () => ({
diff --git a/client/src/components/Chat/TemporaryChat.tsx b/client/src/components/Chat/TemporaryChat.tsx
index e2aac8a24c..acc87db611 100644
--- a/client/src/components/Chat/TemporaryChat.tsx
+++ b/client/src/components/Chat/TemporaryChat.tsx
@@ -1,7 +1,7 @@
import { HatGlasses } from 'lucide-react';
import { Chip, TooltipAnchor } from '@librechat/client';
import { useShortcutAriaKey, useShortcutHint } from '~/hooks/useKeyboardShortcuts';
-import useTemporaryChat from '~/hooks/Chat/useTemporaryChat';
+import useTemporaryChat from '~/hooks/Conversations/useTemporaryChat';
import { useLocalize } from '~/hooks';
import { cn } from '~/utils';
diff --git a/client/src/components/Chat/__tests__/ExportAndShareMenu.test.tsx b/client/src/components/Chat/__tests__/ExportAndShareMenu.test.tsx
index d776a01621..02a2c411dc 100644
--- a/client/src/components/Chat/__tests__/ExportAndShareMenu.test.tsx
+++ b/client/src/components/Chat/__tests__/ExportAndShareMenu.test.tsx
@@ -26,7 +26,7 @@ jest.mock('~/hooks', () => ({
useLocalize: () => (key: string) => key,
}));
-jest.mock('~/hooks/Chat/useChatOptions', () => ({
+jest.mock('~/hooks/Sharing/useChatOptions', () => ({
__esModule: true,
default: (args: unknown) => {
mockUseChatOptions(args);
diff --git a/client/src/components/Messages/Content/Error/recovery.tsx b/client/src/components/Messages/Content/Error/recovery.tsx
index dc2683c8df..10242152e0 100644
--- a/client/src/components/Messages/Content/Error/recovery.tsx
+++ b/client/src/components/Messages/Content/Error/recovery.tsx
@@ -23,12 +23,12 @@ import {
pendingReasoningOverrideFamily,
} from '~/components/Chat/Input/Composer/state';
import { findAttachmentRecovery, isAttachmentError, mayBeAttachmentError } from './attachments';
+import useGetAddedConvo from '~/hooks/Conversations/useGetAddedConvo';
import { useMessageContext } from '~/Providers/MessageContext';
import { useLocalize, useNavigateToConvo } from '~/hooks';
import { useForkConvoMutation } from '~/data-provider';
import { ChatContext } from '~/Providers/ChatContext';
import { ErrorAction, ErrorActions } from './parts';
-import { useGetAddedConvo } from '~/hooks/Chat';
import store from '~/store';
/** What the card says the actions do, matched to the ones it offers. */
diff --git a/client/src/components/Messages/Content/__tests__/recovery.spec.tsx b/client/src/components/Messages/Content/__tests__/recovery.spec.tsx
index b5ee825142..80a180793b 100644
--- a/client/src/components/Messages/Content/__tests__/recovery.spec.tsx
+++ b/client/src/components/Messages/Content/__tests__/recovery.spec.tsx
@@ -37,8 +37,9 @@ jest.mock('~/hooks', () => ({
useNavigateToConvo: () => ({ navigateToConvo: mockNavigateToConvo }),
}));
-jest.mock('~/hooks/Chat', () => ({
- useGetAddedConvo: () => () => null,
+jest.mock('~/hooks/Conversations/useGetAddedConvo', () => ({
+ __esModule: true,
+ default: () => () => null,
}));
jest.mock('~/data-provider', () => ({
diff --git a/client/src/components/Nav/SettingsTabs/Data/ArchiveAllChats.tsx b/client/src/components/Nav/SettingsTabs/Data/ArchiveAllChats.tsx
index f98d18e883..9b624cce0a 100644
--- a/client/src/components/Nav/SettingsTabs/Data/ArchiveAllChats.tsx
+++ b/client/src/components/Nav/SettingsTabs/Data/ArchiveAllChats.tsx
@@ -14,8 +14,8 @@ import {
import type { TConversation } from 'librechat-data-provider';
import useGetConversation from '~/hooks/Conversations/useGetConversation';
import { useArchiveAllConversationsMutation } from '~/data-provider';
+import useNewChat from '~/hooks/Conversations/useNewChat';
import { isTemporaryConversation } from '~/utils';
-import useNewChat from '~/hooks/Chat/useNewChat';
import { NotificationSeverity } from '~/common';
import { useLocalize } from '~/hooks';
diff --git a/client/src/components/Nav/SettingsTabs/Data/__tests__/ArchiveAllChats.test.tsx b/client/src/components/Nav/SettingsTabs/Data/__tests__/ArchiveAllChats.test.tsx
index 98b6607dfa..14859a3357 100644
--- a/client/src/components/Nav/SettingsTabs/Data/__tests__/ArchiveAllChats.test.tsx
+++ b/client/src/components/Nav/SettingsTabs/Data/__tests__/ArchiveAllChats.test.tsx
@@ -50,7 +50,7 @@ jest.mock('~/hooks/Conversations/useGetConversation', () => ({
default: () => mockGetConversation,
}));
-jest.mock('~/hooks/Chat/useNewChat', () => ({
+jest.mock('~/hooks/Conversations/useNewChat', () => ({
__esModule: true,
default: () => ({ startNewChat: mockStartNewChat }),
}));
diff --git a/client/src/components/UnifiedSidebar/ExpandedPanel.tsx b/client/src/components/UnifiedSidebar/ExpandedPanel.tsx
index eb377881fb..e7cc891598 100644
--- a/client/src/components/UnifiedSidebar/ExpandedPanel.tsx
+++ b/client/src/components/UnifiedSidebar/ExpandedPanel.tsx
@@ -7,8 +7,8 @@ import { useShortcutAriaKey, useShortcutHint } from '~/hooks/useKeyboardShortcut
import { useActivePanel, resolveActivePanel, DEFAULT_PANEL } from '~/Providers';
import AgentMarketplaceButton from '~/components/Nav/AgentMarketplaceButton';
import { CLOSE_SIDEBAR_ID } from '~/components/Chat/Menus/OpenSidebar';
+import useNewChat from '~/hooks/Conversations/useNewChat';
import { lazyWithRecovery } from '~/lib/assets/lazy';
-import useNewChat from '~/hooks/Chat/useNewChat';
import { useLocalize } from '~/hooks';
const AccountSettings = lazyWithRecovery(() => import('~/components/Nav/AccountSettings'));
diff --git a/client/src/components/UnifiedSidebar/__tests__/ExpandedPanel.spec.tsx b/client/src/components/UnifiedSidebar/__tests__/ExpandedPanel.spec.tsx
index b7f2158e4d..c6b4998286 100644
--- a/client/src/components/UnifiedSidebar/__tests__/ExpandedPanel.spec.tsx
+++ b/client/src/components/UnifiedSidebar/__tests__/ExpandedPanel.spec.tsx
@@ -47,7 +47,7 @@ jest.mock('~/hooks', () => ({
* escapes the `~/hooks` mock above. Mirrors its contract closely enough that
* the panel-switch assertions still exercise the `onNewChat` wiring.
*/
-jest.mock('~/hooks/Chat/useNewChat', () => ({
+jest.mock('~/hooks/Conversations/useNewChat', () => ({
__esModule: true,
default: ({ onNewChat }: { onNewChat?: () => void } = {}) => ({
newConversation: mockNewConversation,
diff --git a/client/src/components/UnifiedSidebar/mobile/NewChat.tsx b/client/src/components/UnifiedSidebar/mobile/NewChat.tsx
index 9e17a22bfe..19cd1701ed 100644
--- a/client/src/components/UnifiedSidebar/mobile/NewChat.tsx
+++ b/client/src/components/UnifiedSidebar/mobile/NewChat.tsx
@@ -3,7 +3,7 @@ import { SquarePen } from 'lucide-react';
import { Button, TooltipAnchor } from '@librechat/client';
import { useShortcutAriaKey } from '~/hooks/useKeyboardShortcuts';
import { useActivePanel, DEFAULT_PANEL } from '~/Providers';
-import useNewChat from '~/hooks/Chat/useNewChat';
+import useNewChat from '~/hooks/Conversations/useNewChat';
import { useLocalize } from '~/hooks';
/**
diff --git a/client/src/hooks/Chat/__tests__/contract.spec.tsx b/client/src/hooks/Chat/__tests__/contract.spec.tsx
index e855ee9309..abf47cf9a8 100644
--- a/client/src/hooks/Chat/__tests__/contract.spec.tsx
+++ b/client/src/hooks/Chat/__tests__/contract.spec.tsx
@@ -7,7 +7,7 @@ import type { TConversation, TModelSpec } from 'librechat-data-provider';
import type { MutableSnapshot } from 'recoil';
import type { ChatSettings } from '../contract';
import { ChatSettingsContext, defaultChatSettings } from '~/Providers/ChatSettingsContext';
-import useTemporaryChat from '../useTemporaryChat';
+import useTemporaryChat from '~/hooks/Conversations/useTemporaryChat';
import useChatHelpers from '../useChatHelpers';
import useTokenLimits from '../useTokenLimits';
import store from '~/store';
diff --git a/client/src/hooks/Chat/contract.check.ts b/client/src/hooks/Chat/contract.check.ts
index f16e32dc5d..a95c2dd1bf 100644
--- a/client/src/hooks/Chat/contract.check.ts
+++ b/client/src/hooks/Chat/contract.check.ts
@@ -12,9 +12,9 @@ import type { ContextType } from 'react';
import type { ChatContract, AddedChatContract, ChatSettings, Transport } from './contract';
import type { ChatTransportContext } from '~/Providers/ChatTransportContext';
import type { ChatSettingsContext } from '~/Providers/ChatSettingsContext';
+import type useAddedResponse from '~/hooks/Conversations/useAddedResponse';
import type { AddedChatContext } from '~/Providers/AddedChatContext';
import type { ChatContext } from '~/Providers/ChatContext';
-import type useAddedResponse from './useAddedResponse';
import type useChatFunctions from './useChatFunctions';
import type useChatHelpers from './useChatHelpers';
import type useNewConvo from '../useNewConvo';
diff --git a/client/src/hooks/Chat/index.ts b/client/src/hooks/Chat/index.ts
index 49afa24333..82241590da 100644
--- a/client/src/hooks/Chat/index.ts
+++ b/client/src/hooks/Chat/index.ts
@@ -1,12 +1,7 @@
-export { default as useNewChat } from './useNewChat';
-export { default as useMultiConvo } from './useMultiConvo';
-export { default as useTemporaryChat } from './useTemporaryChat';
export { default as useChatHelpers } from './useChatHelpers';
export { default as useTokenLimits } from './useTokenLimits';
export { default as useTokenUsage } from './useTokenUsage';
-export { default as useAddedResponse } from './useAddedResponse';
export { default as useChatFunctions } from './useChatFunctions';
-export { default as useGetAddedConvo } from './useGetAddedConvo';
export { default as useIdChangeEffect } from './useIdChangeEffect';
export { default as useFocusChatEffect } from './useFocusChatEffect';
export { default as useQueueDrain } from './useQueueDrain';
diff --git a/client/src/hooks/Chat/__tests__/useNewChat.spec.ts b/client/src/hooks/Conversations/__tests__/useNewChat.spec.ts
similarity index 100%
rename from client/src/hooks/Chat/__tests__/useNewChat.spec.ts
rename to client/src/hooks/Conversations/__tests__/useNewChat.spec.ts
diff --git a/client/src/hooks/Conversations/index.ts b/client/src/hooks/Conversations/index.ts
index ecb2922adf..c5de8c58f9 100644
--- a/client/src/hooks/Conversations/index.ts
+++ b/client/src/hooks/Conversations/index.ts
@@ -24,3 +24,8 @@ export { default as useConversationSeen } from './useConversationSeen';
export { default as useUpdateTagsInConvo } from './useUpdateTagsInConvo';
export { default as useExportConversation } from './useExportConversation';
export { default as useUnseenConversations } from './useUnseenConversations';
+export { default as useNewChat } from './useNewChat';
+export { default as useMultiConvo } from './useMultiConvo';
+export { default as useTemporaryChat } from './useTemporaryChat';
+export { default as useAddedResponse } from './useAddedResponse';
+export { default as useGetAddedConvo } from './useGetAddedConvo';
diff --git a/client/src/hooks/Chat/useAddedResponse.ts b/client/src/hooks/Conversations/useAddedResponse.ts
similarity index 98%
rename from client/src/hooks/Chat/useAddedResponse.ts
rename to client/src/hooks/Conversations/useAddedResponse.ts
index 8f7c696b50..275e6fe633 100644
--- a/client/src/hooks/Chat/useAddedResponse.ts
+++ b/client/src/hooks/Conversations/useAddedResponse.ts
@@ -9,7 +9,7 @@ import {
} from 'librechat-data-provider';
import type { TEndpointsConfig, EModelEndpoint, TConversation } from 'librechat-data-provider';
import type { AssistantListItem, NewConversationParams } from '~/common';
-import type { AddedChatContract } from './contract';
+import type { AddedChatContract } from '~/hooks/Chat/contract';
import useAssistantListMap from '~/hooks/Assistants/useAssistantListMap';
import { buildDefaultConvo, getDefaultEndpoint } from '~/utils';
import { useGetEndpointsQuery } from '~/data-provider';
diff --git a/client/src/hooks/Chat/useGetAddedConvo.ts b/client/src/hooks/Conversations/useGetAddedConvo.ts
similarity index 100%
rename from client/src/hooks/Chat/useGetAddedConvo.ts
rename to client/src/hooks/Conversations/useGetAddedConvo.ts
diff --git a/client/src/hooks/Chat/useMultiConvo.ts b/client/src/hooks/Conversations/useMultiConvo.ts
similarity index 100%
rename from client/src/hooks/Chat/useMultiConvo.ts
rename to client/src/hooks/Conversations/useMultiConvo.ts
diff --git a/client/src/hooks/Chat/useNewChat.ts b/client/src/hooks/Conversations/useNewChat.ts
similarity index 100%
rename from client/src/hooks/Chat/useNewChat.ts
rename to client/src/hooks/Conversations/useNewChat.ts
diff --git a/client/src/hooks/Chat/useTemporaryChat.ts b/client/src/hooks/Conversations/useTemporaryChat.ts
similarity index 100%
rename from client/src/hooks/Chat/useTemporaryChat.ts
rename to client/src/hooks/Conversations/useTemporaryChat.ts
diff --git a/client/src/hooks/Messages/useMessageActions.tsx b/client/src/hooks/Messages/useMessageActions.tsx
index 59a06493e9..cc27ffe2da 100644
--- a/client/src/hooks/Messages/useMessageActions.tsx
+++ b/client/src/hooks/Messages/useMessageActions.tsx
@@ -19,8 +19,8 @@ import {
hasCopyableText,
} from './useCopyToClipboard';
import { useAssistantsMapContext, useAgentsMapContext } from '~/Providers';
+import useGetAddedConvo from '~/hooks/Conversations/useGetAddedConvo';
import { useAuthContext } from '~/hooks/AuthContext';
-import { useGetAddedConvo } from '~/hooks/Chat';
import { useLocalize } from '~/hooks';
import store from '~/store';
diff --git a/client/src/hooks/Messages/useMessageHelpers.tsx b/client/src/hooks/Messages/useMessageHelpers.tsx
index 4704f952c3..584bbfac4f 100644
--- a/client/src/hooks/Messages/useMessageHelpers.tsx
+++ b/client/src/hooks/Messages/useMessageHelpers.tsx
@@ -13,7 +13,7 @@ import {
hasCopyableText,
} from './useCopyToClipboard';
import { useMessagesViewContext, useAssistantsMapContext, useAgentsMapContext } from '~/Providers';
-import { useGetAddedConvo } from '~/hooks/Chat';
+import useGetAddedConvo from '~/hooks/Conversations/useGetAddedConvo';
import { logger } from '~/utils';
export default function useMessageHelpers(
diff --git a/client/src/hooks/Chat/__tests__/useChatOptions.spec.tsx b/client/src/hooks/Sharing/__tests__/useChatOptions.spec.tsx
similarity index 100%
rename from client/src/hooks/Chat/__tests__/useChatOptions.spec.tsx
rename to client/src/hooks/Sharing/__tests__/useChatOptions.spec.tsx
diff --git a/client/src/hooks/Chat/useBookmarkItems.tsx b/client/src/hooks/Sharing/useBookmarkItems.tsx
similarity index 100%
rename from client/src/hooks/Chat/useBookmarkItems.tsx
rename to client/src/hooks/Sharing/useBookmarkItems.tsx
diff --git a/client/src/hooks/Chat/useChatOptions.tsx b/client/src/hooks/Sharing/useChatOptions.tsx
similarity index 99%
rename from client/src/hooks/Chat/useChatOptions.tsx
rename to client/src/hooks/Sharing/useChatOptions.tsx
index a37a2154d4..ecafa0e6fe 100644
--- a/client/src/hooks/Chat/useChatOptions.tsx
+++ b/client/src/hooks/Sharing/useChatOptions.tsx
@@ -18,8 +18,8 @@ import { findConvoInAllQueries, isTemporaryConversation, hasRealTitle } from '~/
import DeleteButton from '~/components/Conversations/ConvoOptions/DeleteButton';
import { useLocalize, useNavigateToConvo, useNewConvo } from '~/hooks';
import { useChatSettings } from '~/Providers/ChatSettingsContext';
+import useProjectMenuItem from '~/hooks/Chat/useProjectMenuItem';
import { useChatContext, useLiveAnnouncer } from '~/Providers';
-import useProjectMenuItem from './useProjectMenuItem';
import { NotificationSeverity } from '~/common';
import useExportShare from './useExportShare';
import Rename from '~/components/Chat/Rename';
diff --git a/client/src/hooks/Chat/useExportShare.tsx b/client/src/hooks/Sharing/useExportShare.tsx
similarity index 96%
rename from client/src/hooks/Chat/useExportShare.tsx
rename to client/src/hooks/Sharing/useExportShare.tsx
index e511e1d40c..7e416239a0 100644
--- a/client/src/hooks/Chat/useExportShare.tsx
+++ b/client/src/hooks/Sharing/useExportShare.tsx
@@ -56,7 +56,7 @@ export default function useExportShare({
{
label: localize('com_ui_share'),
onClick: () => setShowShareDialog(true),
- icon: <Share2 className="size-4 text-text-secondary" />,
+ icon: <Share2 className="text-text-secondary size-4" />,
show: isSharedButtonEnabled && canCreateSharedLinks,
/** NOTE: THE FOLLOWING PROPS ARE REQUIRED FOR MENU ITEMS THAT OPEN DIALOGS */
hideOnClick: false,
@@ -66,7 +66,7 @@ export default function useExportShare({
{
label: localize('com_endpoint_export'),
onClick: () => setShowExports(true),
- icon: <Upload className="size-4 text-text-secondary" />,
+ icon: <Upload className="text-text-secondary size-4" />,
/** NOTE: THE FOLLOWING PROPS ARE REQUIRED FOR MENU ITEMS THAT OPEN DIALOGS */
hideOnClick: false,
ref: exportButtonRef,
diff --git a/client/src/hooks/useKeyboardShortcuts.ts b/client/src/hooks/useKeyboardShortcuts.ts
index 933203aac3..4ce66c1d77 100644
--- a/client/src/hooks/useKeyboardShortcuts.ts
+++ b/client/src/hooks/useKeyboardShortcuts.ts
@@ -19,9 +19,9 @@ import { useArchiveConvoMutation, useGetStartupConfig } from '~/data-provider';
import { mainTextareaId, NotificationSeverity } from '~/common';
import useSidebarToggle from '~/hooks/Nav/useSidebarToggle';
import { showFilesDialogAtom } from '~/store/filesDialog';
+import useNewChat from '~/hooks/Conversations/useNewChat';
import { useHasAccess, useLocalize } from '~/hooks';
import { getFocusedChatPane } from '~/utils/pane';
-import useNewChat from '~/hooks/Chat/useNewChat';
import store from '~/store';
const isMac = isMacPlatform;