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
c16e2b8d
authored
Jul 25, 2023
by
archer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
perf: app detail
parent
3adb97b3
Hide whitespace changes
Inline
Side-by-side
Showing
29 changed files
with
39 additions
and
19 deletions
+39
-19
client/src/components/ChatBox/QuoteModal.tsx
+1
-1
client/src/components/ChatBox/ResponseDetailModal.tsx
+1
-2
client/src/components/ChatBox/index.tsx
+1
-0
client/src/constants/theme.ts
+6
-0
client/src/pages/app/detail/components/AdEdit/components/ChatTest.tsx
+0
-0
client/src/pages/app/detail/components/AdEdit/components/Nodes/NodeAnswer.tsx
+0
-0
client/src/pages/app/detail/components/AdEdit/components/Nodes/NodeCQNode.tsx
+0
-0
client/src/pages/app/detail/components/AdEdit/components/Nodes/NodeChat.tsx
+0
-0
client/src/pages/app/detail/components/AdEdit/components/Nodes/NodeEmpty.tsx
+0
-0
client/src/pages/app/detail/components/AdEdit/components/Nodes/NodeHistory.tsx
+0
-0
client/src/pages/app/detail/components/AdEdit/components/Nodes/NodeKbSearch.tsx
+0
-0
client/src/pages/app/detail/components/AdEdit/components/Nodes/NodeQuestionInput.tsx
+0
-0
client/src/pages/app/detail/components/AdEdit/components/Nodes/NodeTFSwitch.tsx
+0
-0
client/src/pages/app/detail/components/AdEdit/components/Nodes/NodeUserGuide.tsx
+0
-0
client/src/pages/app/detail/components/AdEdit/components/Nodes/NodeVariable.tsx
+0
-0
client/src/pages/app/detail/components/AdEdit/components/TemplateList.tsx
+0
-0
client/src/pages/app/detail/components/AdEdit/components/modules/ButtonEdge.tsx
+0
-0
client/src/pages/app/detail/components/AdEdit/components/modules/Container.tsx
+0
-0
client/src/pages/app/detail/components/AdEdit/components/modules/Divider.tsx
+0
-0
client/src/pages/app/detail/components/AdEdit/components/modules/Label.tsx
+0
-0
client/src/pages/app/detail/components/AdEdit/components/modules/NodeCard.tsx
+0
-0
client/src/pages/app/detail/components/AdEdit/components/render/RenderInput.tsx
+0
-0
client/src/pages/app/detail/components/AdEdit/components/render/RenderOutput.tsx
+0
-0
client/src/pages/app/detail/components/AdEdit/index.module.scss
+0
-0
client/src/pages/app/detail/components/AdEdit/index.tsx
+0
-0
client/src/pages/app/detail/components/Charts/TotalUsage.tsx
+1
-1
client/src/pages/app/detail/components/OverView.tsx
+15
-8
client/src/pages/app/detail/index.tsx
+13
-6
client/src/pages/chat/components/SliderApps.tsx
+1
-1
No files found.
client/src/components/ChatBox/QuoteModal.tsx
View file @
c16e2b8d
...
...
@@ -90,7 +90,7 @@ const QuoteModal = ({
key=
{
item
.
id
}
flex=
{
'1 0 0'
}
p=
{
2
}
borderRadius=
{
'
sm
'
}
borderRadius=
{
'
lg
'
}
border=
{
theme
.
borders
.
base
}
_notLast=
{
{
mb
:
2
}
}
position=
{
'relative'
}
...
...
client/src/components/ChatBox/ResponseDetailModal.tsx
View file @
c16e2b8d
...
...
@@ -2,7 +2,6 @@ import React, { useCallback, useMemo, useState } from 'react';
import
{
ChatModuleEnum
}
from
'@/constants/chat'
;
import
{
ChatHistoryItemResType
,
ChatItemType
,
QuoteItemType
}
from
'@/types/chat'
;
import
{
Flex
,
BoxProps
}
from
'@chakra-ui/react'
;
import
{
updateHistoryQuote
}
from
'@/api/chat'
;
import
dynamic
from
'next/dynamic'
;
import
Tag
from
'../Tag'
;
import
MyTooltip
from
'../MyTooltip'
;
...
...
@@ -62,7 +61,7 @@ const ResponseDetailModal = ({
</
MyTooltip
>
)
}
{
completeMessages
.
length
>
0
&&
(
<
MyTooltip
label=
{
'点击查看完整对话记录'
}
forceShow
>
<
MyTooltip
label=
{
'点击查看完整对话记录'
}
>
<
Tag
colorSchema=
"green"
cursor=
{
'pointer'
}
...
...
client/src/components/ChatBox/index.tsx
View file @
c16e2b8d
...
...
@@ -584,6 +584,7 @@ const ChatBox = (
whiteSpace=
{
'pre-wrap'
}
{
...
MessageCardStyle
}
bg=
{
'myBlue.300'
}
borderRadius=
{
'8px 0 8px 8px'
}
>
<
Box
as=
{
'p'
}
>
{
item
.
value
}
</
Box
>
</
Card
>
...
...
client/src/constants/theme.ts
View file @
c16e2b8d
...
...
@@ -293,6 +293,12 @@ export const theme = extendTheme({
md
:
'1px solid #DAE0E2'
,
lg
:
'1px solid #D0E0E2'
},
shadows
:
{
sm
:
'0 0 5px rgba(0,0,0,0.1)'
,
md
:
'0 0 8px rgba(0,0,0,0.1)'
,
base
:
'0 0 10px rgba(0,0,0,0.15)'
,
lg
:
'0 0 10px rgba(0,0,0,0.2)'
},
breakpoints
:
{
sm
:
'900px'
,
md
:
'1200px'
,
...
...
client/src/pages/app/detail/components/Edit/components/ChatTest.tsx
→
client/src/pages/app/detail/components/
Ad
Edit/components/ChatTest.tsx
View file @
c16e2b8d
File moved
client/src/pages/app/detail/components/Edit/components/Nodes/NodeAnswer.tsx
→
client/src/pages/app/detail/components/
Ad
Edit/components/Nodes/NodeAnswer.tsx
View file @
c16e2b8d
File moved
client/src/pages/app/detail/components/Edit/components/Nodes/NodeCQNode.tsx
→
client/src/pages/app/detail/components/
Ad
Edit/components/Nodes/NodeCQNode.tsx
View file @
c16e2b8d
File moved
client/src/pages/app/detail/components/Edit/components/Nodes/NodeChat.tsx
→
client/src/pages/app/detail/components/
Ad
Edit/components/Nodes/NodeChat.tsx
View file @
c16e2b8d
File moved
client/src/pages/app/detail/components/Edit/components/Nodes/NodeEmpty.tsx
→
client/src/pages/app/detail/components/
Ad
Edit/components/Nodes/NodeEmpty.tsx
View file @
c16e2b8d
File moved
client/src/pages/app/detail/components/Edit/components/Nodes/NodeHistory.tsx
→
client/src/pages/app/detail/components/
Ad
Edit/components/Nodes/NodeHistory.tsx
View file @
c16e2b8d
File moved
client/src/pages/app/detail/components/Edit/components/Nodes/NodeKbSearch.tsx
→
client/src/pages/app/detail/components/
Ad
Edit/components/Nodes/NodeKbSearch.tsx
View file @
c16e2b8d
File moved
client/src/pages/app/detail/components/Edit/components/Nodes/NodeQuestionInput.tsx
→
client/src/pages/app/detail/components/
Ad
Edit/components/Nodes/NodeQuestionInput.tsx
View file @
c16e2b8d
File moved
client/src/pages/app/detail/components/Edit/components/Nodes/NodeTFSwitch.tsx
→
client/src/pages/app/detail/components/
Ad
Edit/components/Nodes/NodeTFSwitch.tsx
View file @
c16e2b8d
File moved
client/src/pages/app/detail/components/Edit/components/Nodes/NodeUserGuide.tsx
→
client/src/pages/app/detail/components/
Ad
Edit/components/Nodes/NodeUserGuide.tsx
View file @
c16e2b8d
File moved
client/src/pages/app/detail/components/Edit/components/Nodes/NodeVariable.tsx
→
client/src/pages/app/detail/components/
Ad
Edit/components/Nodes/NodeVariable.tsx
View file @
c16e2b8d
File moved
client/src/pages/app/detail/components/Edit/components/TemplateList.tsx
→
client/src/pages/app/detail/components/
Ad
Edit/components/TemplateList.tsx
View file @
c16e2b8d
File moved
client/src/pages/app/detail/components/Edit/components/modules/ButtonEdge.tsx
→
client/src/pages/app/detail/components/
Ad
Edit/components/modules/ButtonEdge.tsx
View file @
c16e2b8d
File moved
client/src/pages/app/detail/components/Edit/components/modules/Container.tsx
→
client/src/pages/app/detail/components/
Ad
Edit/components/modules/Container.tsx
View file @
c16e2b8d
File moved
client/src/pages/app/detail/components/Edit/components/modules/Divider.tsx
→
client/src/pages/app/detail/components/
Ad
Edit/components/modules/Divider.tsx
View file @
c16e2b8d
File moved
client/src/pages/app/detail/components/Edit/components/modules/Label.tsx
→
client/src/pages/app/detail/components/
Ad
Edit/components/modules/Label.tsx
View file @
c16e2b8d
File moved
client/src/pages/app/detail/components/Edit/components/modules/NodeCard.tsx
→
client/src/pages/app/detail/components/
Ad
Edit/components/modules/NodeCard.tsx
View file @
c16e2b8d
File moved
client/src/pages/app/detail/components/Edit/components/render/RenderInput.tsx
→
client/src/pages/app/detail/components/
Ad
Edit/components/render/RenderInput.tsx
View file @
c16e2b8d
File moved
client/src/pages/app/detail/components/Edit/components/render/RenderOutput.tsx
→
client/src/pages/app/detail/components/
Ad
Edit/components/render/RenderOutput.tsx
View file @
c16e2b8d
File moved
client/src/pages/app/detail/components/Edit/index.module.scss
→
client/src/pages/app/detail/components/
Ad
Edit/index.module.scss
View file @
c16e2b8d
File moved
client/src/pages/app/detail/components/Edit/index.tsx
→
client/src/pages/app/detail/components/
Ad
Edit/index.tsx
View file @
c16e2b8d
File moved
client/src/pages/app/detail/components/Charts/TotalUsage.tsx
View file @
c16e2b8d
...
...
@@ -192,7 +192,7 @@ const TokenUsage = ({ appId }: { appId: string }) => {
}, [screenWidth]);
return (
<Box ref={Dom} w={'100%'} flex={'1 0 0'} h={'100%'}
minH={'150px'}
position={'relative'}>
<Box ref={Dom} w={'100%'} flex={'1 0 0'} h={'100%'} position={'relative'}>
<Loading fixed={false} />
</Box>
);
...
...
client/src/pages/app/detail/components/OverView.tsx
View file @
c16e2b8d
...
...
@@ -13,7 +13,7 @@ import dynamic from 'next/dynamic';
import
Avatar
from
'@/components/Avatar'
;
import
MyIcon
from
'@/components/Icon'
;
import
TotalUsage
from
'./Charts/TotalUsage'
;
import
BasicEdit
from
'./BasicEdit
'
;
import
MyTooltip
from
'@/components/MyTooltip
'
;
const
InfoModal
=
dynamic
(()
=>
import
(
'./InfoModal'
));
...
...
@@ -74,7 +74,9 @@ const OverView = ({ appId }: { appId: string }) => {
position=
{
'relative'
}
>
<
Flex
alignItems=
{
'center'
}
py=
{
2
}
>
<
Avatar
src=
{
appDetail
.
avatar
}
borderRadius=
{
'md'
}
w=
{
'28px'
}
/>
<
MyTooltip
label=
{
'选择头像'
}
>
<
Avatar
src=
{
appDetail
.
avatar
}
borderRadius=
{
'md'
}
w=
{
'28px'
}
/>
</
MyTooltip
>
<
Box
ml=
{
3
}
fontWeight=
{
'bold'
}
fontSize=
{
'lg'
}
>
{
appDetail
.
name
}
</
Box
>
...
...
@@ -95,7 +97,14 @@ const OverView = ({ appId }: { appId: string }) => {
onClick=
{
openConfirm
(
handleDelModel
)
}
/>
</
Flex
>
<
Box
className=
{
'textEllipsis3'
}
py=
{
3
}
wordBreak=
{
'break-all'
}
color=
{
'myGray.600'
}
>
<
Box
h=
{
'68px'
}
flex=
{
1
}
my=
{
2
}
className=
{
'textEllipsis3'
}
wordBreak=
{
'break-all'
}
color=
{
'myGray.600'
}
>
{
appDetail
.
intro
||
'快来给应用一个介绍~'
}
</
Box
>
<
Flex
>
...
...
@@ -138,14 +147,12 @@ const OverView = ({ appId }: { appId: string }) => {
<
Box
mb=
{
2
}
fontSize=
{
[
'md'
,
'xl'
]
}
>
近 14 日消费
</
Box
>
<
TotalUsage
appId=
{
appId
}
/>
<
Box
flex=
{
'1 0 0'
}
boxShadow=
{
theme
.
shadows
.
base
}
borderRadius=
{
'lg'
}
px=
{
5
}
py=
{
4
}
>
<
TotalUsage
appId=
{
appId
}
/>
</
Box
>
</
Flex
>
</
Grid
>
<
Box
flex=
{
'1 0 0'
}
h=
{
[
'auto'
,
0
]
}
mt=
{
4
}
borderTop=
{
theme
.
borders
.
base
}
>
<
BasicEdit
appId=
{
appId
}
/>
</
Box
>
{
settingAppInfo
&&
(
<
InfoModal
defaultApp=
{
settingAppInfo
}
onClose=
{
()
=>
setSettingAppInfo
(
undefined
)
}
/>
)
}
...
...
client/src/pages/app/detail/index.tsx
View file @
c16e2b8d
...
...
@@ -15,7 +15,11 @@ import MyIcon from '@/components/Icon';
import
PageContainer
from
'@/components/PageContainer'
;
import
Loading
from
'@/components/Loading'
;
const
Edit
=
dynamic
(()
=>
import
(
'./components/Edit'
),
{
const
BasicEdit
=
dynamic
(()
=>
import
(
'./components/BasicEdit'
),
{
ssr
:
false
,
loading
:
()
=>
<
Loading
/>
});
const
AdEdit
=
dynamic
(()
=>
import
(
'./components/AdEdit'
),
{
ssr
:
false
,
loading
:
()
=>
<
Loading
/>
});
...
...
@@ -28,7 +32,8 @@ const API = dynamic(() => import('./components/API'), {
enum
TabEnum
{
'overview'
=
'overview'
,
'settings'
=
'settings'
,
'basicEdit'
=
'basicEdit'
,
'adEdit'
=
'adEdit'
,
'share'
=
'share'
,
'API'
=
'API'
}
...
...
@@ -54,8 +59,9 @@ const AppDetail = ({ currentTab }: { currentTab: `${TabEnum}` }) => {
const
tabList
=
useMemo
(
()
=>
[
{
label
:
'基础'
,
id
:
TabEnum
.
overview
,
icon
:
'overviewLight'
},
{
label
:
'高级编排'
,
id
:
TabEnum
.
settings
,
icon
:
'settingLight'
},
{
label
:
'概览'
,
id
:
TabEnum
.
overview
,
icon
:
'overviewLight'
},
{
label
:
'简易编排'
,
id
:
TabEnum
.
basicEdit
,
icon
:
'edit'
},
{
label
:
'高级编排'
,
id
:
TabEnum
.
adEdit
,
icon
:
'settingLight'
},
{
label
:
'链接分享'
,
id
:
TabEnum
.
share
,
icon
:
'shareLight'
},
{
label
:
'API访问'
,
id
:
TabEnum
.
API
,
icon
:
'apiLight'
},
{
label
:
'立即对话'
,
id
:
'startChat'
,
icon
:
'chatLight'
}
...
...
@@ -169,8 +175,9 @@ const AppDetail = ({ currentTab }: { currentTab: `${TabEnum}` }) => {
</
Box
>
<
Box
flex=
{
'1 0 0'
}
h=
{
[
0
,
'100%'
]
}
overflow=
{
[
'overlay'
,
''
]
}
>
{
currentTab
===
TabEnum
.
overview
&&
<
OverView
appId=
{
appId
}
/>
}
{
currentTab
===
TabEnum
.
settings
&&
appDetail
&&
(
<
Edit
{
currentTab
===
TabEnum
.
basicEdit
&&
<
BasicEdit
appId=
{
appId
}
/>
}
{
currentTab
===
TabEnum
.
adEdit
&&
appDetail
&&
(
<
AdEdit
app=
{
appDetail
}
fullScreen=
{
true
}
onFullScreen=
{
()
=>
setCurrentTab
(
TabEnum
.
overview
)
}
...
...
client/src/pages/chat/components/SliderApps.tsx
View file @
c16e2b8d
...
...
@@ -21,7 +21,7 @@ const SliderApps = ({ appId }: { appId: string }) => {
px=
{
3
}
borderRadius=
{
'md'
}
_hover=
{
{
bg
:
'myGray.200'
}
}
onClick=
{
()
=>
router
.
back
(
)
}
onClick=
{
()
=>
router
.
push
(
'/app/list'
)
}
>
<
IconButton
mr=
{
3
}
...
...
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