mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-29 01:40:51 +00:00
limit prompt template
This commit is contained in:
@@ -67,13 +67,17 @@ const ChatHistorySlider = ({
|
||||
|
||||
const [currentTab, setCurrentTab] = useState<`${TabEnum}`>(TabEnum.history);
|
||||
|
||||
const isShare = useMemo(() => !appId || !userInfo, [appId, userInfo]);
|
||||
|
||||
// custom title edit
|
||||
const { onOpenModal, EditModal: EditTitleModal } = useEditInfo({
|
||||
title: '自定义历史记录标题',
|
||||
placeholder: '如果设置为空,会自动跟随聊天记录。'
|
||||
});
|
||||
const { openConfirm, ConfirmModal } = useConfirm({
|
||||
content: t('chat.Confirm to clear history')
|
||||
content: isShare
|
||||
? t('chat.Confirm to clear share chat histroy')
|
||||
: t('chat.Confirm to clear history')
|
||||
});
|
||||
|
||||
const concatHistory = useMemo<HistoryItemType[]>(
|
||||
@@ -82,8 +86,6 @@ const ChatHistorySlider = ({
|
||||
[activeChatId, history, t]
|
||||
);
|
||||
|
||||
const isShare = useMemo(() => !appId || !userInfo, [appId, userInfo]);
|
||||
|
||||
useQuery(['init'], () => {
|
||||
if (isShare) {
|
||||
setCurrentTab(TabEnum.history);
|
||||
|
Reference in New Issue
Block a user