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
a77e3880
authored
Jul 28, 2023
by
archer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: flow type
parent
fb8635a9
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
7 deletions
+11
-7
client/src/components/ChatBox/ContextModal.tsx
+1
-1
client/src/components/ChatBox/QuoteModal.tsx
+0
-1
client/src/pages/app/detail/components/AdEdit/components/Nodes/NodeCQNode.tsx
+0
-1
client/src/pages/app/detail/components/AdEdit/index.tsx
+10
-4
No files found.
client/src/components/ChatBox/ContextModal.tsx
View file @
a77e3880
...
@@ -17,8 +17,8 @@ const ContextModal = ({
...
@@ -17,8 +17,8 @@ const ContextModal = ({
isOpen=
{
true
}
isOpen=
{
true
}
onClose=
{
onClose
}
onClose=
{
onClose
}
title=
{
`完整对话记录(${context.length}条)`
}
title=
{
`完整对话记录(${context.length}条)`
}
minW=
{
[
'90vw'
,
'600px'
]
}
h=
{
[
'90vh'
,
'80vh'
]
}
h=
{
[
'90vh'
,
'80vh'
]
}
minW=
{
[
'90vw'
,
'600px'
]
}
isCentered
isCentered
>
>
<
ModalBody
pt=
{
0
}
whiteSpace=
{
'pre-wrap'
}
textAlign=
{
'justify'
}
fontSize=
{
'sm'
}
>
<
ModalBody
pt=
{
0
}
whiteSpace=
{
'pre-wrap'
}
textAlign=
{
'justify'
}
fontSize=
{
'sm'
}
>
...
...
client/src/components/ChatBox/QuoteModal.tsx
View file @
a77e3880
...
@@ -76,7 +76,6 @@ const QuoteModal = ({
...
@@ -76,7 +76,6 @@ const QuoteModal = ({
</>
</>
}
}
>
>
<
ModalCloseButton
/>
<
ModalBody
pt=
{
0
}
whiteSpace=
{
'pre-wrap'
}
textAlign=
{
'justify'
}
fontSize=
{
'sm'
}
>
<
ModalBody
pt=
{
0
}
whiteSpace=
{
'pre-wrap'
}
textAlign=
{
'justify'
}
fontSize=
{
'sm'
}
>
{
rawSearch
.
map
((
item
)
=>
(
{
rawSearch
.
map
((
item
)
=>
(
<
Box
<
Box
...
...
client/src/pages/app/detail/components/AdEdit/components/Nodes/NodeCQNode.tsx
View file @
a77e3880
...
@@ -7,7 +7,6 @@ import Divider from '../modules/Divider';
...
@@ -7,7 +7,6 @@ import Divider from '../modules/Divider';
import
Container
from
'../modules/Container'
;
import
Container
from
'../modules/Container'
;
import
RenderInput
from
'../render/RenderInput'
;
import
RenderInput
from
'../render/RenderInput'
;
import
type
{
ClassifyQuestionAgentItemType
}
from
'@/types/app'
;
import
type
{
ClassifyQuestionAgentItemType
}
from
'@/types/app'
;
import
{
Handle
,
Position
}
from
'reactflow'
;
import
{
customAlphabet
}
from
'nanoid'
;
import
{
customAlphabet
}
from
'nanoid'
;
const
nanoid
=
customAlphabet
(
'abcdefghijklmnopqrstuvwxyz1234567890'
,
4
);
const
nanoid
=
customAlphabet
(
'abcdefghijklmnopqrstuvwxyz1234567890'
,
4
);
import
MyIcon
from
'@/components/Icon'
;
import
MyIcon
from
'@/components/Icon'
;
...
...
client/src/pages/app/detail/components/AdEdit/index.tsx
View file @
a77e3880
...
@@ -16,7 +16,8 @@ import {
...
@@ -16,7 +16,8 @@ import {
edgeOptions
,
edgeOptions
,
connectionLineStyle
,
connectionLineStyle
,
FlowModuleTypeEnum
,
FlowModuleTypeEnum
,
FlowInputItemTypeEnum
FlowInputItemTypeEnum
,
FlowValueTypeEnum
}
from
'@/constants/flow'
;
}
from
'@/constants/flow'
;
import
{
appModule2FlowNode
,
appModule2FlowEdge
}
from
'@/utils/adapt'
;
import
{
appModule2FlowNode
,
appModule2FlowEdge
}
from
'@/utils/adapt'
;
import
{
import
{
...
@@ -231,9 +232,14 @@ const AppEdit = ({ app, fullScreen, onFullScreen }: Props) => {
...
@@ -231,9 +232,14 @@ const AppEdit = ({ app, fullScreen, onFullScreen }: Props) => {
);
);
const
onConnect
=
useCallback
(
const
onConnect
=
useCallback
(
({
connect
}:
{
connect
:
Connection
})
=>
{
({
connect
}:
{
connect
:
Connection
})
=>
{
const
sourceType
=
nodes
const
source
=
nodes
.
find
((
node
)
=>
node
.
id
===
connect
.
source
)?.
data
;
.
find
((
node
)
=>
node
.
id
===
connect
.
source
)
const
sourceType
=
(()
=>
{
?.
data
?.
outputs
.
find
((
output
)
=>
output
.
key
===
connect
.
sourceHandle
)?.
valueType
;
if
(
source
?.
flowType
===
FlowModuleTypeEnum
.
classifyQuestion
)
{
return
FlowValueTypeEnum
.
boolean
;
}
return
source
?.
outputs
.
find
((
output
)
=>
output
.
key
===
connect
.
sourceHandle
)?.
valueType
;
})();
const
targetType
=
nodes
const
targetType
=
nodes
.
find
((
node
)
=>
node
.
id
===
connect
.
target
)
.
find
((
node
)
=>
node
.
id
===
connect
.
target
)
?.
data
?.
inputs
.
find
((
input
)
=>
input
.
key
===
connect
.
targetHandle
)?.
valueType
;
?.
data
?.
inputs
.
find
((
input
)
=>
input
.
key
===
connect
.
targetHandle
)?.
valueType
;
...
...
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