mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-22 20:37:48 +00:00
fix: ts
This commit is contained in:
@@ -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 = ''
|
||||||
}: {
|
}: {
|
@@ -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: '如果设置为空,会自动跟随聊天记录。'
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user