From d6350e0ee459eb10b1255e44db53d51ac0c5b7b2 Mon Sep 17 00:00:00 2001 From: aliang <1098486429@qq.com> Date: Wed, 18 Sep 2024 13:50:19 +0800 Subject: [PATCH] fix(ui): adjust height for avatars in Chat (#3158) * fix(ui): adjust height for avatars in Chat * [autofix.ci] apply automated fixes --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> --- ee/tabby-ui/components/chat/code-references.tsx | 6 +++++- ee/tabby-ui/components/chat/question-answer.tsx | 12 ++++++++---- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/ee/tabby-ui/components/chat/code-references.tsx b/ee/tabby-ui/components/chat/code-references.tsx index 380346745720..a25e42db5a57 100644 --- a/ee/tabby-ui/components/chat/code-references.tsx +++ b/ee/tabby-ui/components/chat/code-references.tsx @@ -21,6 +21,7 @@ interface ContextReferencesProps { contexts: RelevantCodeContext[] userContexts?: RelevantCodeContext[] className?: string + triggerClassname?: string onContextClick?: ( context: RelevantCodeContext, isInWorkspace?: boolean @@ -40,6 +41,7 @@ export const CodeReferences = forwardRef< contexts, userContexts, className, + triggerClassname, onContextClick, enableTooltip, onTooltipClick, @@ -76,7 +78,9 @@ export const CodeReferences = forwardRef< onValueChange={setAccordionValue} > - + {`Read ${totalContextLength} file${ isMultipleReferences ? 's' : '' }`} diff --git a/ee/tabby-ui/components/chat/question-answer.tsx b/ee/tabby-ui/components/chat/question-answer.tsx index abd52db7128c..854ca6e72d54 100644 --- a/ee/tabby-ui/components/chat/question-answer.tsx +++ b/ee/tabby-ui/components/chat/question-answer.tsx @@ -128,9 +128,12 @@ function UserMessageCard(props: { message: UserMessage }) { {...props} >
@@ -325,7 +328,7 @@ function AssistantMessageCard(props: AssistantMessageCardProps) { )} {...rest} > -
+
@@ -355,6 +358,7 @@ function AssistantMessageCard(props: AssistantMessageCardProps) { // When onApplyInEditor is null, it means isInEditor === false, thus there's no need to showExternalLink showExternalLink={!!onApplyInEditor} highlightIndex={relevantCodeHighlightIndex} + triggerClassname="md:pt-0" /> {isLoading && !message?.message ? (