mirror of
https://github.com/enricoros/big-AGI.git
synced 2026-05-10 21:50:14 -07:00
ChatMessage: Fix Avatar on Mobile
This commit is contained in:
@@ -537,6 +537,7 @@ export function AppChat() {
|
||||
capabilityHasT2I={capabilityHasT2I}
|
||||
chatLLMContextTokens={chatLLM?.contextTokens ?? null}
|
||||
fitScreen={isMobile || isMultiPane}
|
||||
isMobile={isMobile}
|
||||
isMessageSelectionMode={isMessageSelectionMode}
|
||||
setIsMessageSelectionMode={setIsMessageSelectionMode}
|
||||
onConversationBranch={handleConversationBranch}
|
||||
|
||||
@@ -34,6 +34,7 @@ export function ChatMessageList(props: {
|
||||
capabilityHasT2I: boolean,
|
||||
chatLLMContextTokens: number | null,
|
||||
fitScreen: boolean,
|
||||
isMobile: boolean,
|
||||
isMessageSelectionMode: boolean,
|
||||
onConversationBranch: (conversationId: DConversationId, messageId: string) => void,
|
||||
onConversationExecuteHistory: (conversationId: DConversationId, history: DMessage[]) => Promise<void>,
|
||||
@@ -278,6 +279,7 @@ export function ChatMessageList(props: {
|
||||
message={message}
|
||||
// diffPreviousText={message === diffTargetMessage ? diffPrevText : undefined}
|
||||
fitScreen={props.fitScreen}
|
||||
isMobileForAvatar={props.isMobile}
|
||||
isBottom={idx === count - 1}
|
||||
isImagining={isImagining}
|
||||
isSpeaking={isSpeaking}
|
||||
|
||||
@@ -221,6 +221,7 @@ export function ChatMessage(props: {
|
||||
message: DMessage,
|
||||
diffPreviousText?: string,
|
||||
fitScreen: boolean,
|
||||
isMobileForAvatar?: boolean,
|
||||
isBottom?: boolean,
|
||||
isImagining?: boolean,
|
||||
isSpeaking?: boolean,
|
||||
@@ -589,8 +590,8 @@ export function ChatMessage(props: {
|
||||
<Box
|
||||
onClick={handleOpsMenuToggle}
|
||||
onContextMenu={handleOpsMenuToggle}
|
||||
onMouseEnter={() => setIsHovering(true)}
|
||||
onMouseLeave={() => setIsHovering(false)}
|
||||
onMouseEnter={props.isMobileForAvatar ? undefined : () => setIsHovering(true)}
|
||||
onMouseLeave={props.isMobileForAvatar ? undefined : () => setIsHovering(false)}
|
||||
sx={{ display: 'flex' }}
|
||||
>
|
||||
{(isHovering || opsMenuAnchor) ? (
|
||||
@@ -856,7 +857,7 @@ export function ChatMessage(props: {
|
||||
)}
|
||||
|
||||
|
||||
{/* Selection (Contextual) Menu */}
|
||||
{/* Selection (Right-click) Menu */}
|
||||
{!!selMenuAnchor && (
|
||||
<CloseableMenu
|
||||
dense placement='bottom-start'
|
||||
|
||||
@@ -137,6 +137,7 @@ export function LinkChatViewer(props: { conversation: DConversation, storedAt: D
|
||||
key={'msg-' + message.id}
|
||||
message={message}
|
||||
fitScreen={isMobile}
|
||||
isMobileForAvatar={isMobile}
|
||||
showBlocksDate={idx === 0 || idx === filteredMessages.length - 1 /* first and last message */}
|
||||
onMessageEdit={(_messageId, text: string) => message.fragments = [createTextContentFragment(text)] /* TODO: replace edit with Content rather than text */}
|
||||
/>,
|
||||
|
||||
@@ -88,6 +88,7 @@ export function BeamScatterInput(props: {
|
||||
<ChatMessageMemo
|
||||
message={lastHistoryMessage}
|
||||
fitScreen={props.isMobile}
|
||||
isMobileForAvatar={props.isMobile}
|
||||
showAvatar={true}
|
||||
adjustContentScaling={-1}
|
||||
topDecorator={userMessageDecorator}
|
||||
|
||||
Reference in New Issue
Block a user