Skip to content

Commit

Permalink
fix(vue): styling and other issues with searchbox and AIAnswer
Browse files Browse the repository at this point in the history
  • Loading branch information
mohdashraf010897 committed Aug 10, 2023
1 parent eabf864 commit 41f1c1f
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 15 deletions.
2 changes: 1 addition & 1 deletion packages/vue-playground
6 changes: 5 additions & 1 deletion packages/vue/src/components/search/AIAnswer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,12 @@ const AIAnswer = defineComponent({
// pushing message history so far
if (messagesHistory && Array.isArray(messagesHistory)) {
finalMessages.push(
...messagesHistory.filter((msg) => msg.role !== AI_ROLES.SYSTEM).slice(1),
...messagesHistory.filter((msg) => msg.role !== AI_ROLES.SYSTEM),
);

if (finalMessages[0].role === AI_ROLES.USER) {
finalMessages.shift();
}
} else if (response && response.answer && response.answer.text) {
finalMessages.push({ role: AI_ROLES.ASSISTANT, content: response.answer.text });
if (!this.AISessionId)
Expand Down
11 changes: 0 additions & 11 deletions packages/vue/src/styles/AIAnswer.js
Original file line number Diff line number Diff line change
Expand Up @@ -390,17 +390,6 @@ export const MessageInput = styled(TextArea)`
? props.theme.colors.titleColor
: props.theme.colors.textColor};
::placeholder {
color: ${(props) => props.theme.colors.textColor};
}
:-ms-input-placeholder {
color: ${(props) => props.theme.colors.textColor};
}
::-ms-input-placeholder {
color: ${(props) => props.theme.colors.textColor};
}
${({ enterButton }) =>
enterButton
&& `
Expand Down
2 changes: 2 additions & 0 deletions packages/vue/src/styles/Input.js
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,8 @@ const TextArea = styled('textarea')`
height: 42px;
padding-left: 0;
padding-right: 0;
border-color: transparent;
`;

const Actions = styled('div')`
Expand Down
4 changes: 2 additions & 2 deletions packages/vue/src/styles/InputAddon.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ const InputAddon = styled('span')`
align-items: center;
justify-content: center;
background-color: #fafafa;
border: 1px solid #ccc;
border-radius: 2px;
border: 1px solid transparent;
border-radius: 6px;
color: rgba(0, 0, 0, 0.85);
font-size: 14px;
font-weight: 400;
Expand Down

0 comments on commit 41f1c1f

Please sign in to comment.