-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'development' into feat/3052-from-edit-to-move-endpoint
- Loading branch information
Showing
68 changed files
with
599 additions
and
487 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 10 additions & 2 deletions
12
apps/chat/src/components/Chat/ChatInput/ChatInputFooter.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,17 @@ | ||
import { ScreenState } from '@/src/types/common'; | ||
|
||
import { FooterMessage } from '../../Common/FooterMessage'; | ||
import { withRenderForScreen } from '../../Common/ScreenRender'; | ||
|
||
export const ChatInputFooter = () => { | ||
function ChatInputFooterView() { | ||
return ( | ||
<div className="p-5 max-md:hidden"> | ||
<FooterMessage /> | ||
</div> | ||
); | ||
}; | ||
} | ||
|
||
export const ChatInputFooter = withRenderForScreen([ | ||
ScreenState.TABLET, | ||
ScreenState.DESKTOP, | ||
])(ChatInputFooterView); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
apps/chat/src/components/Chat/ChatInput/PromptVariablesForApplyDialog.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import { useCallback } from 'react'; | ||
|
||
import { ChatActions } from '@/src/store/chat/chat.reducer'; | ||
import { useAppDispatch, useAppSelector } from '@/src/store/hooks'; | ||
import { | ||
PromptsActions, | ||
PromptsSelectors, | ||
} from '@/src/store/prompts/prompts.reducers'; | ||
|
||
import { withRenderWhen } from '../../Common/RenderWhen'; | ||
import { PromptVariablesDialog } from './PromptVariablesDialog'; | ||
|
||
function PromptVariablesForApplyDialogView() { | ||
const dispatch = useAppDispatch(); | ||
|
||
const prompt = useAppSelector( | ||
PromptsSelectors.selectPromptWithVariablesForApply, | ||
); | ||
|
||
const handleClose = useCallback(() => { | ||
dispatch(PromptsActions.setPromptWithVariablesForApply()); | ||
}, [dispatch]); | ||
|
||
const handleSubmit = useCallback( | ||
(updatedContent: string) => { | ||
dispatch(ChatActions.appendInputContent(updatedContent)); | ||
handleClose(); | ||
}, | ||
[dispatch, handleClose], | ||
); | ||
return ( | ||
<PromptVariablesDialog | ||
prompt={prompt!} | ||
onClose={handleClose} | ||
onSubmit={handleSubmit} | ||
/> | ||
); | ||
} | ||
|
||
export const PromptVariablesForApplyDialog = withRenderWhen( | ||
PromptsSelectors.selectPromptWithVariablesForApply, | ||
)(PromptVariablesForApplyDialogView); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 6 additions & 2 deletions
8
.../src/components/Chat/MainModalManager.jsx → ...src/components/Chat/ChatModalsManager.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,19 @@ | ||
import { ReplaceConfirmationModal } from '../Common/ReplaceConfirmationModal/ReplaceConfirmationModal'; | ||
import { UnshareDialog } from '../Common/UnshareDialog'; | ||
import { UserMobile } from '../Header/User/UserMobile'; | ||
import { PromptVariablesForApplyDialog } from './ChatInput/PromptVariablesForApplyDialog'; | ||
import { RenameConversationModal } from './RenameConversationModal'; | ||
import { ShareModal } from './ShareModal'; | ||
|
||
export const MainModalManager = () => { | ||
export function ChatModalsManager() { | ||
return ( | ||
<> | ||
<UserMobile /> | ||
<ShareModal /> | ||
<UnshareDialog /> | ||
<ReplaceConfirmationModal /> | ||
<RenameConversationModal /> | ||
<PromptVariablesForApplyDialog /> | ||
</> | ||
); | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.