diff --git a/.eslintrc.js b/.eslintrc.js
index 4ce829ffc3..dfb3307b9c 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -4,5 +4,7 @@ config.extends.push('plugin:@next/next/recommended');
config.rules['unicorn/no-negated-condition'] = 0;
config.rules['unicorn/prefer-type-error'] = 0;
+config.rules['unicorn/prefer-logical-operator-over-ternary'] = 0;
+config.rules['unicorn/no-null'] = 0;
module.exports = config;
diff --git a/src/pages/chat/[id]/Conversation/Input/index.tsx b/src/pages/chat/[id]/Conversation/Input/index.tsx
index f3aec1162e..ab2e94fa11 100644
--- a/src/pages/chat/[id]/Conversation/Input/index.tsx
+++ b/src/pages/chat/[id]/Conversation/Input/index.tsx
@@ -1,7 +1,7 @@
import { ChatInputArea, DraggablePanel, Icon, Tooltip } from '@lobehub/ui';
import { Button } from 'antd';
import { LucideGalleryVerticalEnd } from 'lucide-react';
-import { memo, useMemo, useState } from 'react';
+import { memo, useState } from 'react';
import { useTranslation } from 'react-i18next';
import { shallow } from 'zustand/shallow';
@@ -18,18 +18,15 @@ const ChatInput = () => {
const [text, setText] = useState('');
const [inputHeight] = useSettings((s) => [s.inputHeight], shallow);
- const [sendMessage, saveToTopic] = useSessionStore(
- (s) => [s.createOrSendMsg, s.saveToTopic],
+ const [sendMessage, hasTopic, saveToTopic] = useSessionStore(
+ (s) => [s.createOrSendMsg, !!s.activeTopicId, s.saveToTopic],
shallow,
);
- const footer = useMemo(
- () => (
-
- } onClick={saveToTopic} />
-
- ),
- [],
+ const footer = hasTopic ? null : (
+
+ } onClick={saveToTopic} />
+
);
return (
diff --git a/src/store/settings/action.ts b/src/store/settings/action.ts
index 9d69eb6adb..f2bbb6cc37 100644
--- a/src/store/settings/action.ts
+++ b/src/store/settings/action.ts
@@ -52,7 +52,7 @@ export const createSettings: StateCreator<
setSettings({
...settings,
// 如果用户存在用户头像,那么不做导入
- avatar: get().settings.avatar ?? settings.avatar,
+ avatar: !get().settings.avatar ? settings.avatar : get().settings.avatar,
});
},
resetSettings: () => {