fix modal dup id

This commit is contained in:
Chuck1sn
2025-06-04 10:53:33 +08:00
parent 34e0d3d8e7
commit 07e590dc2d
21 changed files with 1881 additions and 1927 deletions

View File

@@ -104,7 +104,8 @@ import useUserStore from "../composables/store/useUserStore";
import { useUserUpsert } from "../composables/user/useUserUpsert";
import type { UserUpsertSubmitModel } from "../types/user";
const { messages, chat, isLoading, cancel, searchAction, executeAction } = useAiChat();
const { messages, chat, isLoading, cancel, searchAction, executeAction } =
useAiChat();
const { user } = useUserStore();
const userUpsertModal = ref<ModalInterface>();
const departmentUpsertModal = ref<ModalInterface>();
@@ -249,7 +250,10 @@ const abortChat = () => {
cancel();
};
const chatByMode = async (message: string, mode: "chat" | "search" | "execute") => {
const chatByMode = async (
message: string,
mode: "chat" | "search" | "execute",
) => {
inputMessage.value = "";
messages.value.push({
content: message,
@@ -266,7 +270,10 @@ const chatByMode = async (message: string, mode: "chat" | "search" | "execute")
}
};
const handleSendClick = async (message: string, mode: "chat" | "search" | "execute") => {
const handleSendClick = async (
message: string,
mode: "chat" | "search" | "execute",
) => {
scrollToBottom();
if (isLoading.value) {
abortChat();