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 {
Modal,
ModalOverlay,
@@ -12,7 +12,7 @@ import {
Button
} from '@chakra-ui/react';
export const useEditTitle = ({
export const useEditInfo = ({
title,
placeholder = ''
}: {

View File

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