perf: attribute
This commit is contained in:
@@ -125,7 +125,7 @@ const PcSliderBar = ({
|
||||
w={'100%'}
|
||||
h={'100%'}
|
||||
leftIcon={<AddIcon />}
|
||||
onClick={() => router.replace(`/chat?modelId=${modelId}`)}
|
||||
onClick={() => router.replace(`/chat?appId=${modelId}`)}
|
||||
>
|
||||
新对话
|
||||
</Button>
|
||||
@@ -176,9 +176,9 @@ const PcSliderBar = ({
|
||||
onClick={() => {
|
||||
if (item._id === chatId) return;
|
||||
if (isPc) {
|
||||
router.replace(`/chat?modelId=${item.modelId}&chatId=${item._id}`);
|
||||
router.replace(`/chat?appId=${item.modelId}&chatId=${item._id}`);
|
||||
} else {
|
||||
router.push(`/chat?modelId=${item.modelId}&chatId=${item._id}`);
|
||||
router.push(`/chat?appId=${item.modelId}&chatId=${item._id}`);
|
||||
}
|
||||
}}
|
||||
onContextMenu={(e) => onclickContextMenu(e, item)}
|
||||
@@ -251,7 +251,7 @@ const PcSliderBar = ({
|
||||
try {
|
||||
await onclickDelHistory(contextMenuData.history._id);
|
||||
if (contextMenuData.history._id === chatId) {
|
||||
router.replace(`/chat?modelId=${modelId}`);
|
||||
router.replace(`/chat?appId=${modelId}`);
|
||||
}
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
|
||||
@@ -30,7 +30,7 @@ const ModelList = ({ models, modelId }: { models: AppListItemType[]; modelId: st
|
||||
}
|
||||
: {})}
|
||||
onClick={() => {
|
||||
router.replace(`/chat?modelId=${item._id}`);
|
||||
router.replace(`/chat?appId=${item._id}`);
|
||||
}}
|
||||
>
|
||||
<Avatar src={item.avatar} w={'34px'} h={'34px'} />
|
||||
|
||||
@@ -95,7 +95,7 @@ const PhoneSliderBar = ({
|
||||
color={'white'}
|
||||
leftIcon={<AddIcon />}
|
||||
onClick={() => {
|
||||
router.replace(`/chat?modelId=${modelId}`);
|
||||
router.replace(`/chat?appId=${modelId}`);
|
||||
onClose();
|
||||
}}
|
||||
>
|
||||
@@ -128,7 +128,7 @@ const PhoneSliderBar = ({
|
||||
: {})}
|
||||
onClick={async () => {
|
||||
if (item._id === modelId) return;
|
||||
router.replace(`/chat?modelId=${item._id}`);
|
||||
router.replace(`/chat?appId=${item._id}`);
|
||||
onClose();
|
||||
}}
|
||||
>
|
||||
@@ -159,7 +159,7 @@ const PhoneSliderBar = ({
|
||||
: {})}
|
||||
onClick={() => {
|
||||
if (item._id === chatId) return;
|
||||
router.replace(`/chat?modelId=${item.modelId}&chatId=${item._id}`);
|
||||
router.replace(`/chat?appId=${item.modelId}&chatId=${item._id}`);
|
||||
onClose();
|
||||
}}
|
||||
>
|
||||
@@ -177,7 +177,7 @@ const PhoneSliderBar = ({
|
||||
await delChatHistoryById(item._id);
|
||||
loadHistory({ pageNum: 1, init: true });
|
||||
if (item._id === chatId) {
|
||||
router.replace(`/chat?modelId=${modelId}`);
|
||||
router.replace(`/chat?appId=${modelId}`);
|
||||
}
|
||||
}}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user