feat: Add customizable chat input and file upload components #8237
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces a set of customizations to the frontend codebase, primarily focusing on replacing existing file upload and chat input functionalities with customizable alternatives. The changes aim to enhance modularity and adaptability for specific use cases.
Customization for Chat Input:
CustomChatInput
Component: Introduced a newCustomChatInput
component that wraps the existingChatInput
component, allowing customization of chat input behavior. (src/frontend/src/customization/components/custom-chat-input.tsx
)ChatView
: Replaced the originalChatInput
component withCustomChatInput
in theChatView
component to integrate the new customizable chat input functionality. (src/frontend/src/modals/IOModal/components/chatView/components/chat-view.tsx
)Customization for File Upload:
customPostUploadFileV2
as a wrapper around the existingusePostUploadFileV2
hook to enable customization of file upload operations. (src/frontend/src/customization/hooks/use-custom-post-upload-file.ts
)FileRendererComponent
,FilesPage
, etc.) to usecustomPostUploadFileV2
instead of the originalusePostUploadFileV2
. This ensures all file upload operations now use the customizable hook. (src/frontend/src/modals/fileManagerModal/components/filesRendererComponent/components/fileRendererComponent/index.tsx
,src/frontend/src/pages/MainPage/pages/filesPage/index.tsx
) [1] [2] [3] [4]Utility Enhancements:
customUseFileHandler
as a wrapper around the existinguseFileHandler
hook, enabling customization of file handling logic. (src/frontend/src/customization/hooks/use-custom-use-file-handler.ts
)These changes collectively improve the flexibility of the frontend components and hooks, making them more adaptable to different requirements.