diff --git a/README.md b/README.md index 8e78c3ea..036f940e 100644 --- a/README.md +++ b/README.md @@ -71,7 +71,6 @@ const App = () => ( | `showTranslationOriginal` | | `bool` | `false` | Show button to see original text when translated | | `showSettings` | | `bool` | `true` | Show the settings panel button | | `showTypingText` | | `bool` | `false` | Show default sentences while loading text (see: Typing stories) | -| `showInstruct` | | `bool` | `false` | Show the switch selecting between test mode or instruct mode, needs an administrative session as a giver | | `showLogin` | | `bool` | `true` | Show the login button | | `showClear` | | `bool` | `false` | Show clear chat history button | | `showOnlyLastMessages` | | `bool` | `true` or `false` \* | Show only last 2 messages. (\*) Defaults to `true` for `TOTEM` and `WEBSITE_ASSISTANT` layouts, `false` otherwise | @@ -154,7 +153,6 @@ const MyCustomLayout: React.FC = ({ changeModeProps, sessionId, hasUserActivatedSpeak, - showInstruct = false, loading = false, poweredBy, }) => ( diff --git a/src/components/Avatar/Avatar.tsx b/src/components/Avatar/Avatar.tsx index 0b43fa91..6dddec1c 100644 --- a/src/components/Avatar/Avatar.tsx +++ b/src/components/Avatar/Avatar.tsx @@ -17,8 +17,6 @@ import Edit from '../icons/Edit'; import cx from 'classnames'; import ContainerAvatarView from './AvatarView'; import { useViseme } from '../../context/visemeContext'; -import PositionControls from './AvatarView/AvatarComponent/positionControls/positionControls'; -import { getLocalConfig } from '../../helpers/configuration'; export interface Props { memori: Memori; @@ -97,7 +95,8 @@ const Avatar: React.FC = ({ integrationConfig?.avatar === 'customglb' || integrationConfig?.avatar === 'customrpm') && integrationConfig?.avatarURL && - (avatarType && avatarType !== 'blob') + avatarType && + avatarType !== 'blob' ) { return ( <> @@ -128,7 +127,7 @@ const Avatar: React.FC = ({ if ( integrationConfig?.avatar === 'readyplayerme' || integrationConfig?.avatar === 'readyplayerme-full' || - integrationConfig?.avatar === 'customrpm' + integrationConfig?.avatar === 'customrpm' ) { return ( { pushMessage={jest.fn()} sessionID={sessionID} simulateUserPrompt={jest.fn()} - selectReceiverTag={jest.fn()} setAttachmentsMenuOpen={jest.fn()} setSendOnEnter={jest.fn()} userMessage="" @@ -74,7 +73,6 @@ it('renders Chat with memori typing unchanged', () => { pushMessage={jest.fn()} sessionID={sessionID} simulateUserPrompt={jest.fn()} - selectReceiverTag={jest.fn()} setAttachmentsMenuOpen={jest.fn()} setSendOnEnter={jest.fn()} userMessage="" @@ -107,7 +105,6 @@ it('renders Chat with hints unchanged', () => { pushMessage={jest.fn()} sessionID={sessionID} simulateUserPrompt={jest.fn()} - selectReceiverTag={jest.fn()} setAttachmentsMenuOpen={jest.fn()} setSendOnEnter={jest.fn()} userMessage="" @@ -139,7 +136,6 @@ it('renders Chat with media unchanged', () => { pushMessage={jest.fn()} sessionID={sessionID} simulateUserPrompt={jest.fn()} - selectReceiverTag={jest.fn()} setAttachmentsMenuOpen={jest.fn()} setSendOnEnter={jest.fn()} userMessage="" @@ -171,7 +167,6 @@ it('renders Chat with dates unchanged', () => { pushMessage={jest.fn()} sessionID={sessionID} simulateUserPrompt={jest.fn()} - selectReceiverTag={jest.fn()} setAttachmentsMenuOpen={jest.fn()} setSendOnEnter={jest.fn()} userMessage="" @@ -204,79 +199,6 @@ it('renders Chat with context vars unchanged', () => { pushMessage={jest.fn()} sessionID={sessionID} simulateUserPrompt={jest.fn()} - selectReceiverTag={jest.fn()} - setAttachmentsMenuOpen={jest.fn()} - setSendOnEnter={jest.fn()} - userMessage="" - onChangeUserMessage={jest.fn()} - sendMessage={jest.fn()} - stopListening={jest.fn()} - resetTranscript={jest.fn()} - isPlayingAudio={false} - stopAudio={jest.fn()} - showMicrophone={false} - listening={false} - startListening={jest.fn()} - setEnableFocusChatInput={jest.fn()} - showContextPerLine - /> - ); - expect(container).toMatchSnapshot(); -}); - -it('renders Chat on X3 state unchanged', () => { - const { container } = render( - - ); - expect(container).toMatchSnapshot(); -}); - -it('renders Chat on X2a state unchanged', () => { - const { container } = render( - { pushMessage={jest.fn()} sessionID={sessionID} simulateUserPrompt={jest.fn()} - selectReceiverTag={jest.fn()} setAttachmentsMenuOpen={jest.fn()} setSendOnEnter={jest.fn()} userMessage="" @@ -343,7 +264,6 @@ it('renders Chat with custom user avatar unchanged', () => { pushMessage={jest.fn()} sessionID={sessionID} simulateUserPrompt={jest.fn()} - selectReceiverTag={jest.fn()} setAttachmentsMenuOpen={jest.fn()} setSendOnEnter={jest.fn()} userMessage="" @@ -376,7 +296,6 @@ it('renders Chat with custom user avatar as react element unchanged', () => { pushMessage={jest.fn()} sessionID={sessionID} simulateUserPrompt={jest.fn()} - selectReceiverTag={jest.fn()} setAttachmentsMenuOpen={jest.fn()} setSendOnEnter={jest.fn()} userMessage="" diff --git a/src/components/Chat/Chat.tsx b/src/components/Chat/Chat.tsx index 47a149d2..17b4fcf2 100644 --- a/src/components/Chat/Chat.tsx +++ b/src/components/Chat/Chat.tsx @@ -44,7 +44,6 @@ export interface Props { showTranslationOriginal?: boolean; showWhyThisAnswer?: boolean; client: ReturnType; - selectReceiverTag: (tag: string) => Promise; preview?: boolean; microphoneMode?: 'CONTINUOUS' | 'HOLD_TO_TALK'; sendOnEnter?: 'keypress' | 'click'; @@ -102,7 +101,6 @@ const Chat: React.FC = ({ showWhyThisAnswer = true, showCopyButton = true, showTranslationOriginal = false, - selectReceiverTag, preview = false, instruct = false, showInputs = true, @@ -341,29 +339,6 @@ const Chat: React.FC = ({ - {/* - * TODO: X2a emoji picker - */} - - {dialogState?.state === 'X3' && sessionID && ( -
- {Object.keys(dialogState.knownTags ?? {}) - .filter(t => t !== memori.giverTag) - .map(tag => ( - - ))} -
- )} - {showInputs && ( -
-
-
-
-
-
- - Memori - -
-
-

- Ciao, io sono test, c'è qualcosa che vorresti chiedermi? -

-
-
- -
-
-
-
-
-
-
-

- Prova -

-
-
-
- -
-
-
-
- - Memori - -
-
-

- Mi dispiace, le mie risposte sono limitate. Devi farmi le domande giuste. C'è altro che vuoi sapere? -

-
-
- -
-
-
-
-
-
-
-

- Come faccio a fare delle cose con questa cosa? -

-
-
-
- -
-
-
-
- - Memori - -
-
-

- Ecco qui come. -

-
-
- -
-
-
-
-
- - TEST - : - test - -
-
-
- -
-
-
-

- Ah, grazie! Ciao! -

-
-
-
- -
-
-
-
- - Memori - -
-
-

- Arrivederci. -

-
-
- -
-
-
-
-
- - TEST - : - test - -
-
-
-
-
-
-
-
-
-