Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
赵月辉
/
fastgpt-migrated
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Unverified
Commit
9b683884
authored
May 09, 2023
by
archer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
perf: overflow;load history
parent
4dc541e0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
7 deletions
+5
-7
src/components/Layout/index.tsx
+1
-1
src/pages/chat/index.tsx
+4
-6
No files found.
src/components/Layout/index.tsx
View file @
9b683884
...
...
@@ -35,7 +35,7 @@ const Layout = ({ children, isPcDevice }: { children: JSX.Element; isPcDevice: b
return
(
<>
<
Box
h=
{
'100%'
}
overflowY=
{
'auto'
}
bg=
{
'gray.100'
}
>
<
Box
h=
{
'100%'
}
bg=
{
'gray.100'
}
>
{
isPc
?
(
pcUnShowLayoutRoute
[
router
.
pathname
]
?
(
<
Auth
>
{
children
}
</
Auth
>
...
...
src/pages/chat/index.tsx
View file @
9b683884
...
...
@@ -198,7 +198,6 @@ const Chat = ({
if
(
newChatId
)
{
setForbidLoadChatData
(
true
);
router
.
replace
(
`/chat?modelId=
${
modelId
}
&chatId=
${
newChatId
}
`
);
loadHistory
({
pageNum
:
1
,
init
:
true
});
}
}
catch
(
err
)
{
toast
({
...
...
@@ -222,6 +221,9 @@ const Chat = ({
};
})
}));
// refresh history
loadHistory
({
pageNum
:
1
,
init
:
true
});
},
[
chatId
,
...
...
@@ -488,10 +490,6 @@ const Chat = ({
modelId && setLastChatModelId(modelId);
setLastChatId(chatId);
/* get mode and chat into ↓ */
// phone: history page
if (!isPc && Object.keys(router.query).length === 0) return null;
if (forbidLoadChatData) {
setForbidLoadChatData(false);
return null;
...
...
@@ -566,7 +564,7 @@ const Chat = ({
try {
setIsLoading(true);
await onclickDelHistory(chatData.chatId);
router.replace(`/chat`);
router.replace(`/chat
?modelId=${modelId}
`);
} catch (err) {
console.log(err);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment