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
15dc7b22
authored
Dec 09, 2024
by
Archer
Committed by
GitHub
Dec 09, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
perf: snap code (#3350)
* perf: readme * perf: snap code
parent
c64d629a
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
6 additions
and
8 deletions
+6
-8
README.md
+0
-3
packages/web/hooks/useI18n.ts
+3
-2
projects/app/src/pages/app/detail/components/WorkflowComponents/Flow/hooks/useWorkflow.tsx
+1
-1
projects/app/src/pages/app/detail/components/WorkflowComponents/context/index.tsx
+1
-1
projects/app/src/web/core/workflow/utils.ts
+1
-1
No files found.
README.md
View file @
15dc7b22
...
...
@@ -27,9 +27,6 @@ FastGPT 是一个基于 LLM 大语言模型的知识库问答系统,提供开
<a
href=
"/#-%E7%9B%B8%E5%85%B3%E9%A1%B9%E7%9B%AE"
>
<img
height=
"21"
src=
"https://img.shields.io/badge/相关项目-7d09f1?style=flat-square"
alt=
"project"
>
</a>
<a
href=
"https://github.com/labring/FastGPT/blob/main/LICENSE"
>
<img
height=
"21"
src=
"https://img.shields.io/badge/License-Apache--2.0-ffffff?style=flat-square&labelColor=d4eaf7&color=7d09f1"
alt=
"license"
>
</a>
</p>
https://github.com/labring/FastGPT/assets/15308462/7d3a38df-eb0e-4388-9250-2409bd33f6d4
...
...
packages/web/hooks/useI18n.ts
View file @
15dc7b22
...
...
@@ -32,9 +32,10 @@ export const useI18nLng = () => {
});
const
currentLng
=
i18n
?.
language
;
await
i18n
?.
changeLanguage
?.(
lang
)
;
if
(
!
currentLng
)
return
;
if
(
currentLng
!==
lang
&&
currentLng
)
{
await
i18n
?.
changeLanguage
?.(
lang
);
if
(
currentLng
!==
lang
)
{
window
?.
location
?.
reload
?.();
}
};
...
...
projects/app/src/pages/app/detail/components/WorkflowComponents/Flow/hooks/useWorkflow.tsx
View file @
15dc7b22
...
...
@@ -672,7 +672,7 @@ export const useWorkflow = () => {
export
const
useLoopNode
=
()
=>
{
const
nodes
=
useContextSelector
(
WorkflowInitContext
,
(
state
)
=>
state
.
nodes
);
const
onNodesChange
=
useContextSelector
(
WorkflowNodeEdgeContext
,
(
state
)
=>
state
.
onNodesChange
);
const
{
onChangeNode
}
=
useContextSelector
(
WorkflowContext
,
(
v
)
=>
v
);
const
onChangeNode
=
useContextSelector
(
WorkflowContext
,
(
v
)
=>
v
.
onChangeNode
);
const
resetParentNodeSizeAndPosition
=
useMemoizedFn
((
parentId
:
string
)
=>
{
const
{
childNodes
,
loopNode
}
=
nodes
.
reduce
(
...
...
projects/app/src/pages/app/detail/components/WorkflowComponents/context/index.tsx
View file @
15dc7b22
...
...
@@ -831,7 +831,7 @@ const WorkflowContextProvider = ({
const
undo
=
useMemoizedFn
(()
=>
{
if
(
past
.
length
>
1
)
{
forbiddenSaveSnapshot
.
current
=
true
;
// Current version is the first one, so we need to reset the second one
const
firstPast
=
past
[
1
];
resetSnapshot
(
firstPast
);
...
...
projects/app/src/web/core/workflow/utils.ts
View file @
15dc7b22
...
...
@@ -634,7 +634,7 @@ export const compareSnapshot = (
selectedTypeIndex
:
input
.
selectedTypeIndex
??
0
,
renderTypeLis
:
input
.
renderTypeList
,
// set to arrayAny for loopInputArray to skip valueType comparison
valueType
:
input
.
key
===
NodeInputKeyEnum
.
loopInputArray
?
'arrayAny'
:
input
.
valueType
,
//
valueType: input.key === NodeInputKeyEnum.loopInputArray ? 'arrayAny' : input.valueType,
value
:
input
.
value
??
undefined
})),
outputs
:
node
.
data
.
outputs
.
map
((
item
:
FlowNodeOutputItemType
)
=>
({
...
...
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