limit prompt template

This commit is contained in:
archer
2023-09-05 18:15:42 +08:00
parent 9bf5a3ec76
commit fa3f3e6264
9 changed files with 31 additions and 24 deletions

View File

@@ -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);