|
|
@@ -9,34 +9,34 @@ import React, {
|
|
|
RefObject,
|
|
|
} from "react";
|
|
|
|
|
|
-import SendWhiteIcon from "@/app/icons/send-white.svg";
|
|
|
-import BrainIcon from "@/app/icons/brain.svg";
|
|
|
-import RenameIcon from "@/app/icons/rename.svg";
|
|
|
-import ExportIcon from "@/app/icons/share.svg";
|
|
|
-import ReturnIcon from "@/app/icons/return.svg";
|
|
|
-import CopyIcon from "@/app/icons/copy.svg";
|
|
|
-import LoadingIcon from "@/app/icons/three-dots.svg";
|
|
|
-import LoadingButtonIcon from "@/app/icons/loading.svg";
|
|
|
-import PromptIcon from "@/app/icons/prompt.svg";
|
|
|
-import MaskIcon from "@/app/icons/mask.svg";
|
|
|
-import MaxIcon from "@/app/icons/max.svg";
|
|
|
-import MinIcon from "@/app/icons/min.svg";
|
|
|
-import ResetIcon from "@/app/icons/reload.svg";
|
|
|
-import BreakIcon from "@/app/icons/break.svg";
|
|
|
-import SettingsIcon from "@/app/icons/chat-settings.svg";
|
|
|
-import DeleteIcon from "@/app/icons/clear.svg";
|
|
|
-import PinIcon from "@/app/icons/pin.svg";
|
|
|
-import EditIcon from "@/app/icons/rename.svg";
|
|
|
-import ConfirmIcon from "@/app/icons/confirm.svg";
|
|
|
-import CancelIcon from "@/app/icons/cancel.svg";
|
|
|
-import ImageIcon from "@/app/icons/image.svg";
|
|
|
-
|
|
|
-import LightIcon from "@/app/icons/light.svg";
|
|
|
-import DarkIcon from "@/app/icons/dark.svg";
|
|
|
-import AutoIcon from "@/app/icons/auto.svg";
|
|
|
-import BottomIcon from "@/app/icons/bottom.svg";
|
|
|
-import StopIcon from "@/app/icons/pause.svg";
|
|
|
-import RobotIcon from "@/app/icons/robot.svg";
|
|
|
+import SendWhiteIcon from "../icons/send-white.svg";
|
|
|
+import BrainIcon from "../icons/brain.svg";
|
|
|
+import RenameIcon from "../icons/rename.svg";
|
|
|
+import ExportIcon from "../icons/share.svg";
|
|
|
+import ReturnIcon from "../icons/return.svg";
|
|
|
+import CopyIcon from "../icons/copy.svg";
|
|
|
+import LoadingIcon from "../icons/three-dots.svg";
|
|
|
+import LoadingButtonIcon from "../icons/loading.svg";
|
|
|
+import PromptIcon from "../icons/prompt.svg";
|
|
|
+import MaskIcon from "../icons/mask.svg";
|
|
|
+import MaxIcon from "../icons/max.svg";
|
|
|
+import MinIcon from "../icons/min.svg";
|
|
|
+import ResetIcon from "../icons/reload.svg";
|
|
|
+import BreakIcon from "../icons/break.svg";
|
|
|
+import SettingsIcon from "../icons/chat-settings.svg";
|
|
|
+import DeleteIcon from "../icons/clear.svg";
|
|
|
+import PinIcon from "../icons/pin.svg";
|
|
|
+import EditIcon from "../icons/rename.svg";
|
|
|
+import ConfirmIcon from "../icons/confirm.svg";
|
|
|
+import CancelIcon from "../icons/cancel.svg";
|
|
|
+import ImageIcon from "../icons/image.svg";
|
|
|
+
|
|
|
+import LightIcon from "../icons/light.svg";
|
|
|
+import DarkIcon from "../icons/dark.svg";
|
|
|
+import AutoIcon from "../icons/auto.svg";
|
|
|
+import BottomIcon from "../icons/bottom.svg";
|
|
|
+import StopIcon from "../icons/pause.svg";
|
|
|
+import RobotIcon from "../icons/robot.svg";
|
|
|
|
|
|
import {
|
|
|
ChatMessage,
|
|
|
@@ -49,7 +49,7 @@ import {
|
|
|
useAppConfig,
|
|
|
DEFAULT_TOPIC,
|
|
|
ModelType,
|
|
|
-} from "@/app/store";
|
|
|
+} from "../store";
|
|
|
|
|
|
import {
|
|
|
copyToClipboard,
|
|
|
@@ -59,17 +59,17 @@ import {
|
|
|
getMessageTextContent,
|
|
|
getMessageImages,
|
|
|
isVisionModel,
|
|
|
-} from "@/app/utils";
|
|
|
+} from "../utils";
|
|
|
|
|
|
import { uploadImage as uploadImageRemote } from "@/app/utils/chat";
|
|
|
|
|
|
import dynamic from "next/dynamic";
|
|
|
|
|
|
-import { ChatControllerPool } from "@/app/client/controller";
|
|
|
-import { Prompt, usePromptStore } from "@/app/store/prompt";
|
|
|
-import Locale from "@/app/locales";
|
|
|
+import { ChatControllerPool } from "../client/controller";
|
|
|
+import { Prompt, usePromptStore } from "../store/prompt";
|
|
|
+import Locale from "../locales";
|
|
|
|
|
|
-import { IconButton } from "@/app/components/button";
|
|
|
+import { IconButton } from "./button";
|
|
|
import styles from "./chat.module.scss";
|
|
|
|
|
|
import {
|
|
|
@@ -80,7 +80,7 @@ import {
|
|
|
showConfirm,
|
|
|
showPrompt,
|
|
|
showToast,
|
|
|
-} from "@/app/components/ui-lib";
|
|
|
+} from "./ui-lib";
|
|
|
import { useNavigate } from "react-router-dom";
|
|
|
import {
|
|
|
CHAT_PAGE_SIZE,
|
|
|
@@ -89,27 +89,20 @@ import {
|
|
|
REQUEST_TIMEOUT_MS,
|
|
|
UNFINISHED_INPUT,
|
|
|
ServiceProvider,
|
|
|
-} from "@/app/constant";
|
|
|
-import { Avatar } from "../emoji";
|
|
|
-import {
|
|
|
- ContextPrompts,
|
|
|
- MaskAvatar,
|
|
|
- MaskConfig,
|
|
|
-} from "@/app/components/mask/mask";
|
|
|
-import { useMaskStore } from "@/app/store/mask";
|
|
|
-import { ChatCommandPrefix, useChatCommand, useCommand } from "@/app/command";
|
|
|
-import { prettyObject } from "@/app/utils/format";
|
|
|
-import { ExportMessageModal } from "@/app/components/exporter/exporter";
|
|
|
-import { getClientConfig } from "@/app/config/client";
|
|
|
-import { useAllModels } from "@/app/utils/hooks";
|
|
|
-import { MultimodalContent } from "@/app/client/api";
|
|
|
-
|
|
|
-const Markdown = dynamic(
|
|
|
- async () => (await import("../markdown/markdown")).Markdown,
|
|
|
- {
|
|
|
- loading: () => <LoadingIcon />,
|
|
|
- },
|
|
|
-);
|
|
|
+} from "../constant";
|
|
|
+import { Avatar } from "./emoji";
|
|
|
+import { ContextPrompts, MaskAvatar, MaskConfig } from "./mask";
|
|
|
+import { useMaskStore } from "../store/mask";
|
|
|
+import { ChatCommandPrefix, useChatCommand, useCommand } from "../command";
|
|
|
+import { prettyObject } from "../utils/format";
|
|
|
+import { ExportMessageModal } from "./exporter";
|
|
|
+import { getClientConfig } from "../config/client";
|
|
|
+import { useAllModels } from "../utils/hooks";
|
|
|
+import { MultimodalContent } from "../client/api";
|
|
|
+
|
|
|
+const Markdown = dynamic(async () => (await import("./markdown")).Markdown, {
|
|
|
+ loading: () => <LoadingIcon />,
|
|
|
+});
|
|
|
|
|
|
export function SessionConfigModel(props: { onClose: () => void }) {
|
|
|
const chatStore = useChatStore();
|