This commit is contained in:
archer
2023-05-29 23:49:45 +08:00
parent d36a7cb177
commit cdee91bec1
2 changed files with 4 additions and 4 deletions

View File

@@ -1,4 +1,4 @@
import React, { useCallback, useRef, useState, memo } from 'react'; import React, { useCallback, useRef } from 'react';
import { import {
Modal, Modal,
ModalOverlay, ModalOverlay,
@@ -12,7 +12,7 @@ import {
Button Button
} from '@chakra-ui/react'; } from '@chakra-ui/react';
export const useEditTitle = ({ export const useEditInfo = ({
title, title,
placeholder = '' placeholder = ''
}: { }: {

View File

@@ -22,7 +22,7 @@ import { useChatStore } from '@/store/chat';
import ModelList from './ModelList'; import ModelList from './ModelList';
import { useGlobalStore } from '@/store/global'; import { useGlobalStore } from '@/store/global';
import styles from '../index.module.scss'; import styles from '../index.module.scss';
import { useEditTitle } from './useEditTitle'; import { useEditInfo } from '@/hooks/useEditInfo';
import { putChatHistory } from '@/api/chat'; import { putChatHistory } from '@/api/chat';
import { useToast } from '@/hooks/useToast'; import { useToast } from '@/hooks/useToast';
import { formatTimeToChatTime, getErrText } from '@/utils/tools'; import { formatTimeToChatTime, getErrText } from '@/utils/tools';
@@ -57,7 +57,7 @@ const PcSliderBar = ({
); );
// custom title edit // custom title edit
const { onOpenModal, EditModal: EditTitleModal } = useEditTitle({ const { onOpenModal, EditModal: EditTitleModal } = useEditInfo({
title: '自定义历史记录标题', title: '自定义历史记录标题',
placeholder: '如果设置为空,会自动跟随聊天记录。' placeholder: '如果设置为空,会自动跟随聊天记录。'
}); });