diff --git a/packages/ui-stencil/src/components/internal/orama-chat-messages-container/orama-chat-user-message/orama-chat-user-message.tsx b/packages/ui-stencil/src/components/internal/orama-chat-messages-container/orama-chat-user-message/orama-chat-user-message.tsx index 85a1fe20..2e882545 100644 --- a/packages/ui-stencil/src/components/internal/orama-chat-messages-container/orama-chat-user-message/orama-chat-user-message.tsx +++ b/packages/ui-stencil/src/components/internal/orama-chat-messages-container/orama-chat-user-message/orama-chat-user-message.tsx @@ -13,7 +13,7 @@ export class OramaChatUserMessage { return (
- + {this.interaction.query}
diff --git a/packages/ui-stencil/src/context/chatContext.ts b/packages/ui-stencil/src/context/chatContext.ts index 570bd6bb..14eb0919 100644 --- a/packages/ui-stencil/src/context/chatContext.ts +++ b/packages/ui-stencil/src/context/chatContext.ts @@ -32,10 +32,8 @@ export type TChatInteraction = { } const { state: chatContext } = createStore({ - // TODO: Evaluate if we need to have a error object/string instead of just a boolean chatService: null as ChatService | null, interactions: [] as TChatInteraction[], - error: false, }) export { chatContext } diff --git a/packages/ui-stencil/src/services/ChatService.ts b/packages/ui-stencil/src/services/ChatService.ts index 49c7bb1e..c4d786bd 100644 --- a/packages/ui-stencil/src/services/ChatService.ts +++ b/packages/ui-stencil/src/services/ChatService.ts @@ -14,7 +14,6 @@ export class ChatService { if (!this.oramaClient) { throw new OramaClientNotInitializedError() } - chatContext.error = false // TODO: possibly fix on Orama Client chatContext.interactions = [...chatContext.interactions, { query: term, status: TAnswerStatus.loading }] @@ -66,7 +65,6 @@ export class ChatService { }) } - chatContext.error = false return this.answerSession.ask({ term: term }).catch((error) => { chatContext.interactions = chatContext.interactions.map((interaction, index) => { if (index === chatContext.interactions.length - 1) {