Skip to content

Commit 89d832d

Browse files
committed
Unify global modals:
step1: delete unused code (cherry picked from commit cbc12a2) (cherry picked from commit 4534d8e)
1 parent 108c1aa commit 89d832d

File tree

3 files changed

+2
-661
lines changed

3 files changed

+2
-661
lines changed

frontend/app/[locale]/chat/components/chatHeader.tsx

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ import { useAuth } from "@/hooks/useAuth";
1414
import { USER_ROLES } from "@/const/modelConfig";
1515
import { saveView } from "@/lib/viewPersistence";
1616

17-
import MemoryManageModal from "../internal/memory/memoryManageModal";
18-
1917
interface ChatHeaderProps {
2018
title: string;
2119
onRename?: (newTitle: string) => void;
@@ -25,8 +23,7 @@ export function ChatHeader({ title, onRename }: ChatHeaderProps) {
2523
const router = useRouter();
2624
const [isEditing, setIsEditing] = useState(false);
2725
const [editTitle, setEditTitle] = useState(title);
28-
const [memoryModalVisible, setMemoryModalVisible] = useState(false);
29-
const [embeddingConfigured, setEmbeddingConfigured] = useState<boolean>(true);
26+
3027
const [showConfigPrompt, setShowConfigPrompt] = useState(false);
3128
const [showAutoOffPrompt, setShowAutoOffPrompt] = useState(false);
3229
const inputRef = useRef<HTMLInputElement>(null);
@@ -62,9 +59,8 @@ export function ChatHeader({ title, onRename }: ChatHeaderProps) {
6259
const modelConfig = configStore.getModelConfig();
6360
const configured = Boolean(
6461
modelConfig?.embedding?.modelName ||
65-
modelConfig?.multiEmbedding?.modelName
62+
modelConfig?.multiEmbedding?.modelName
6663
);
67-
setEmbeddingConfigured(configured);
6864

6965
if (!configured) {
7066
// If memory switch is on, turn it off automatically and notify the user
@@ -85,7 +81,6 @@ export function ChatHeader({ title, onRename }: ChatHeaderProps) {
8581
});
8682
}
8783
} catch (e) {
88-
setEmbeddingConfigured(false);
8984
log.error("Failed to read model config for embedding check", e);
9085
}
9186
}, []);
@@ -227,10 +222,6 @@ export function ChatHeader({ title, onRename }: ChatHeaderProps) {
227222
</div>
228223
</div>
229224
</Modal>
230-
<MemoryManageModal
231-
visible={memoryModalVisible}
232-
onClose={() => setMemoryModalVisible(false)}
233-
/>
234225
</>
235226
);
236227
}

frontend/app/[locale]/chat/internal/memory/memoryDeleteModal.tsx

Lines changed: 0 additions & 55 deletions
This file was deleted.

0 commit comments

Comments
 (0)