From c197962851be820469bf2e8624f9b6edd37b13e1 Mon Sep 17 00:00:00 2001 From: fengzai6 Date: Tue, 27 Feb 2024 15:02:58 +0800 Subject: [PATCH 1/4] fix: No history message attached when for gemini-pro-vision --- app/components/chat.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/components/chat.tsx b/app/components/chat.tsx index 9144f9a5f45..32431c69347 100644 --- a/app/components/chat.tsx +++ b/app/components/chat.tsx @@ -459,6 +459,10 @@ export function ChatActions(props: { if (!show) { props.setAttachImages([]); props.setUploading(false); + } else { + // 为visionModel时不附带历史消息 + const newModelConfig = chatStore.currentSession().mask.modelConfig; + newModelConfig.historyMessageCount = 0; } // if current model is not available From 5348d570574b6c1e3bb829df66fed696d9549e28 Mon Sep 17 00:00:00 2001 From: fengzai6 Date: Thu, 7 Mar 2024 15:36:19 +0800 Subject: [PATCH 2/4] Fix EmojiPicker mobile width adaptation and update avatar clicking behavior --- app/components/emoji.tsx | 1 + app/components/settings.tsx | 4 +++- app/components/ui-lib.module.scss | 9 ++++++++- app/components/ui-lib.tsx | 8 ++++---- 4 files changed, 16 insertions(+), 6 deletions(-) diff --git a/app/components/emoji.tsx b/app/components/emoji.tsx index b2434930755..3b1f5e7516b 100644 --- a/app/components/emoji.tsx +++ b/app/components/emoji.tsx @@ -21,6 +21,7 @@ export function AvatarPicker(props: { }) { return (
setShowEmojiPicker(true)} + onClick={() => { + setShowEmojiPicker(!showEmojiPicker); + }} >
diff --git a/app/components/ui-lib.module.scss b/app/components/ui-lib.module.scss index c67d352bee1..83c02f92a23 100644 --- a/app/components/ui-lib.module.scss +++ b/app/components/ui-lib.module.scss @@ -14,17 +14,24 @@ .popover-content { position: absolute; + width: 350px; animation: slide-in 0.3s ease; right: 0; top: calc(100% + 10px); } - +@media screen and (max-width: 600px) { + .popover-content { + width: auto; + } +} .popover-mask { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; + background-color: rgba(0, 0, 0, 0.3); + backdrop-filter: blur(5px); } .list-item { diff --git a/app/components/ui-lib.tsx b/app/components/ui-lib.tsx index f7e326fd318..da700c0fb7c 100644 --- a/app/components/ui-lib.tsx +++ b/app/components/ui-lib.tsx @@ -26,10 +26,10 @@ export function Popover(props: {
{props.children} {props.open && ( -
-
- {props.content} -
+
+ )} + {props.open && ( +
{props.content}
)}
); From c22153a4eb3c663fb87ec9a1d77cda69946309a5 Mon Sep 17 00:00:00 2001 From: fengzai6 Date: Thu, 7 Mar 2024 15:46:13 +0800 Subject: [PATCH 3/4] Revert "fix: No history message attached when for gemini-pro-vision" This reverts commit c197962851be820469bf2e8624f9b6edd37b13e1. --- app/components/chat.tsx | 4 ---- 1 file changed, 4 deletions(-) diff --git a/app/components/chat.tsx b/app/components/chat.tsx index 42ceff093ec..bcd0e605df2 100644 --- a/app/components/chat.tsx +++ b/app/components/chat.tsx @@ -459,10 +459,6 @@ export function ChatActions(props: { if (!show) { props.setAttachImages([]); props.setUploading(false); - } else { - // 为visionModel时不附带历史消息 - const newModelConfig = chatStore.currentSession().mask.modelConfig; - newModelConfig.historyMessageCount = 0; } // if current model is not available From ad10a119032b039c0341994ea1a480eb62d5c30e Mon Sep 17 00:00:00 2001 From: fengzai6 Date: Thu, 7 Mar 2024 15:51:58 +0800 Subject: [PATCH 4/4] Add z-index to avatar --- app/components/settings.module.scss | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/components/settings.module.scss b/app/components/settings.module.scss index 1eac17c16d5..c6aec4203cf 100644 --- a/app/components/settings.module.scss +++ b/app/components/settings.module.scss @@ -5,6 +5,8 @@ .avatar { cursor: pointer; + position: relative; + z-index: 1; } .edit-prompt-modal {