Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
dify
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ai-tech
dify
Commits
3c182518
Unverified
Commit
3c182518
authored
Mar 04, 2024
by
Joel
Committed by
GitHub
Mar 04, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: auto generate prompt result not show (#2678)
parent
8523b34b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
get-automatic-res.tsx
.../app/configuration/config/automatic/get-automatic-res.tsx
+10
-10
No files found.
web/app/components/app/configuration/config/automatic/get-automatic-res.tsx
View file @
3c182518
...
@@ -20,7 +20,7 @@ import useBreakpoints, { MediaType } from '@/hooks/use-breakpoints'
...
@@ -20,7 +20,7 @@ import useBreakpoints, { MediaType } from '@/hooks/use-breakpoints'
const
noDataIcon
=
(
const
noDataIcon
=
(
<
svg
width=
"56"
height=
"56"
viewBox=
"0 0 56 56"
fill=
"none"
xmlns=
"http://www.w3.org/2000/svg"
>
<
svg
width=
"56"
height=
"56"
viewBox=
"0 0 56 56"
fill=
"none"
xmlns=
"http://www.w3.org/2000/svg"
>
<
path
d=
"M10.4998 51.3333V39.6666M10.4998 16.3333V4.66663M4.6665 10.5H16.3332M4.6665 45.5H16.3332M30.3332 6.99996L26.2868 17.5206C25.6287 19.2315 25.2997 20.0869 24.7881 20.8065C24.3346 21.4442 23.7774 22.0014 23.1397 22.4549C22.4202 22.9665 21.5647 23.2955 19.8538 23.9535L9.33317 28L19.8539 32.0464C21.5647 32.7044 22.4202 33.0334 23.1397 33.5451C23.7774 33.9985 24.3346 34.5557 24.7881 35.1934C25.2997 35.913 25.6287 36.7684 26.2868 38.4793L30.3332 49L34.3796 38.4793C35.0376 36.7684 35.3666 35.913 35.8783 35.1934C36.3317 34.5557 36.8889 33.9985 37.5266 33.5451C38.2462 33.0334 39.1016 32.7044 40.8125 32.0464L51.3332 28L40.8125 23.9535C39.1016 23.2955 38.2462 22.9665 37.5266 22.4549C36.8889 22.0014 36.3317 21.4442 35.8783 20.8065C35.3666 20.0869 35.0376 19.2315 34.3796 17.5206L30.3332 6.99996Z"
stroke=
"#EAECF0"
strokeWidth=
"3"
strokeLinecap=
"round"
strokeLinejoin=
"round"
/>
<
path
d=
"M10.4998 51.3333V39.6666M10.4998 16.3333V4.66663M4.6665 10.5H16.3332M4.6665 45.5H16.3332M30.3332 6.99996L26.2868 17.5206C25.6287 19.2315 25.2997 20.0869 24.7881 20.8065C24.3346 21.4442 23.7774 22.0014 23.1397 22.4549C22.4202 22.9665 21.5647 23.2955 19.8538 23.9535L9.33317 28L19.8539 32.0464C21.5647 32.7044 22.4202 33.0334 23.1397 33.5451C23.7774 33.9985 24.3346 34.5557 24.7881 35.1934C25.2997 35.913 25.6287 36.7684 26.2868 38.4793L30.3332 49L34.3796 38.4793C35.0376 36.7684 35.3666 35.913 35.8783 35.1934C36.3317 34.5557 36.8889 33.9985 37.5266 33.5451C38.2462 33.0334 39.1016 32.7044 40.8125 32.0464L51.3332 28L40.8125 23.9535C39.1016 23.2955 38.2462 22.9665 37.5266 22.4549C36.8889 22.0014 36.3317 21.4442 35.8783 20.8065C35.3666 20.0869 35.0376 19.2315 34.3796 17.5206L30.3332 6.99996Z"
stroke=
"#EAECF0"
strokeWidth=
"3"
strokeLinecap=
"round"
strokeLinejoin=
"round"
/>
</
svg
>
</
svg
>
)
)
...
@@ -33,9 +33,9 @@ export type IGetAutomaticResProps = {
...
@@ -33,9 +33,9 @@ export type IGetAutomaticResProps = {
const
genIcon
=
(
const
genIcon
=
(
<
svg
width=
"16"
height=
"16"
viewBox=
"0 0 16 16"
fill=
"none"
xmlns=
"http://www.w3.org/2000/svg"
>
<
svg
width=
"16"
height=
"16"
viewBox=
"0 0 16 16"
fill=
"none"
xmlns=
"http://www.w3.org/2000/svg"
>
<
path
d=
"M3.6665 1.33332C3.6665 0.965133 3.36803 0.666656 2.99984 0.666656C2.63165 0.666656 2.33317 0.965133 2.33317 1.33332V2.33332H1.33317C0.964981 2.33332 0.666504 2.6318 0.666504 2.99999C0.666504 3.36818 0.964981 3.66666 1.33317 3.66666H2.33317V4.66666C2.33317 5.03485 2.63165 5.33332 2.99984 5.33332C3.36803 5.33332 3.6665 5.03485 3.6665 4.66666V3.66666H4.6665C5.03469 3.66666 5.33317 3.36818 5.33317 2.99999C5.33317 2.6318 5.03469 2.33332 4.6665 2.33332H3.6665V1.33332Z"
fill=
"white"
/>
<
path
d=
"M3.6665 1.33332C3.6665 0.965133 3.36803 0.666656 2.99984 0.666656C2.63165 0.666656 2.33317 0.965133 2.33317 1.33332V2.33332H1.33317C0.964981 2.33332 0.666504 2.6318 0.666504 2.99999C0.666504 3.36818 0.964981 3.66666 1.33317 3.66666H2.33317V4.66666C2.33317 5.03485 2.63165 5.33332 2.99984 5.33332C3.36803 5.33332 3.6665 5.03485 3.6665 4.66666V3.66666H4.6665C5.03469 3.66666 5.33317 3.36818 5.33317 2.99999C5.33317 2.6318 5.03469 2.33332 4.6665 2.33332H3.6665V1.33332Z"
fill=
"white"
/>
<
path
d=
"M3.6665 11.3333C3.6665 10.9651 3.36803 10.6667 2.99984 10.6667C2.63165 10.6667 2.33317 10.9651 2.33317 11.3333V12.3333H1.33317C0.964981 12.3333 0.666504 12.6318 0.666504 13C0.666504 13.3682 0.964981 13.6667 1.33317 13.6667H2.33317V14.6667C2.33317 15.0348 2.63165 15.3333 2.99984 15.3333C3.36803 15.3333 3.6665 15.0348 3.6665 14.6667V13.6667H4.6665C5.03469 13.6667 5.33317 13.3682 5.33317 13C5.33317 12.6318 5.03469 12.3333 4.6665 12.3333H3.6665V11.3333Z"
fill=
"white"
/>
<
path
d=
"M3.6665 11.3333C3.6665 10.9651 3.36803 10.6667 2.99984 10.6667C2.63165 10.6667 2.33317 10.9651 2.33317 11.3333V12.3333H1.33317C0.964981 12.3333 0.666504 12.6318 0.666504 13C0.666504 13.3682 0.964981 13.6667 1.33317 13.6667H2.33317V14.6667C2.33317 15.0348 2.63165 15.3333 2.99984 15.3333C3.36803 15.3333 3.6665 15.0348 3.6665 14.6667V13.6667H4.6665C5.03469 13.6667 5.33317 13.3682 5.33317 13C5.33317 12.6318 5.03469 12.3333 4.6665 12.3333H3.6665V11.3333Z"
fill=
"white"
/>
<
path
d=
"M9.28873 1.76067C9.18971 1.50321 8.94235 1.33332 8.6665 1.33332C8.39066 1.33332 8.1433 1.50321 8.04427 1.76067L6.88815 4.76658C6.68789 5.28727 6.62495 5.43732 6.53887 5.55838C6.4525 5.67986 6.34637 5.78599 6.2249 5.87236C6.10384 5.95844 5.95379 6.02137 5.43309 6.22164L2.42718 7.37776C2.16972 7.47678 1.99984 7.72414 1.99984 7.99999C1.99984 8.27584 2.16972 8.5232 2.42718 8.62222L5.43309 9.77834C5.95379 9.97861 6.10384 10.0415 6.2249 10.1276C6.34637 10.214 6.4525 10.3201 6.53887 10.4416C6.62495 10.5627 6.68789 10.7127 6.88816 11.2334L8.04427 14.2393C8.1433 14.4968 8.39066 14.6667 8.6665 14.6667C8.94235 14.6667 9.18971 14.4968 9.28873 14.2393L10.4449 11.2334C10.6451 10.7127 10.7081 10.5627 10.7941 10.4416C10.8805 10.3201 10.9866 10.214 11.1081 10.1276C11.2292 10.0415 11.3792 9.97861 11.8999 9.77834L14.9058 8.62222C15.1633 8.5232 15.3332 8.27584 15.3332 7.99999C15.3332 7.72414 15.1633 7.47678 14.9058 7.37776L11.8999 6.22164C11.3792 6.02137 11.2292 5.95844 11.1081 5.87236C10.9866 5.78599 10.8805 5.67986 10.7941 5.55838C10.7081 5.43732 10.6451 5.28727 10.4449 4.76658L9.28873 1.76067Z"
fill=
"white"
/>
<
path
d=
"M9.28873 1.76067C9.18971 1.50321 8.94235 1.33332 8.6665 1.33332C8.39066 1.33332 8.1433 1.50321 8.04427 1.76067L6.88815 4.76658C6.68789 5.28727 6.62495 5.43732 6.53887 5.55838C6.4525 5.67986 6.34637 5.78599 6.2249 5.87236C6.10384 5.95844 5.95379 6.02137 5.43309 6.22164L2.42718 7.37776C2.16972 7.47678 1.99984 7.72414 1.99984 7.99999C1.99984 8.27584 2.16972 8.5232 2.42718 8.62222L5.43309 9.77834C5.95379 9.97861 6.10384 10.0415 6.2249 10.1276C6.34637 10.214 6.4525 10.3201 6.53887 10.4416C6.62495 10.5627 6.68789 10.7127 6.88816 11.2334L8.04427 14.2393C8.1433 14.4968 8.39066 14.6667 8.6665 14.6667C8.94235 14.6667 9.18971 14.4968 9.28873 14.2393L10.4449 11.2334C10.6451 10.7127 10.7081 10.5627 10.7941 10.4416C10.8805 10.3201 10.9866 10.214 11.1081 10.1276C11.2292 10.0415 11.3792 9.97861 11.8999 9.77834L14.9058 8.62222C15.1633 8.5232 15.3332 8.27584 15.3332 7.99999C15.3332 7.72414 15.1633 7.47678 14.9058 7.37776L11.8999 6.22164C11.3792 6.02137 11.2292 5.95844 11.1081 5.87236C10.9866 5.78599 10.8805 5.67986 10.7941 5.55838C10.7081 5.43732 10.6451 5.28727 10.4449 4.76658L9.28873 1.76067Z"
fill=
"white"
/>
</
svg
>
</
svg
>
)
)
...
@@ -74,14 +74,14 @@ const GetAutomaticRes: FC<IGetAutomaticResProps> = ({
...
@@ -74,14 +74,14 @@ const GetAutomaticRes: FC<IGetAutomaticResProps> = ({
const
[
res
,
setRes
]
=
React
.
useState
<
AutomaticRes
|
null
>
(
null
)
const
[
res
,
setRes
]
=
React
.
useState
<
AutomaticRes
|
null
>
(
null
)
const
renderLoading
=
(
const
renderLoading
=
(
<
div
className=
'grow flex flex-col items-center justify-center h-full space-y-3'
>
<
div
className=
'
w-0
grow flex flex-col items-center justify-center h-full space-y-3'
>
<
Loading
/>
<
Loading
/>
<
div
className=
'text-[13px] text-gray-400'
>
{
t
(
'appDebug.automatic.loading'
)
}
</
div
>
<
div
className=
'text-[13px] text-gray-400'
>
{
t
(
'appDebug.automatic.loading'
)
}
</
div
>
</
div
>
</
div
>
)
)
const
renderNoData
=
(
const
renderNoData
=
(
<
div
className=
'
grow flex flex-col items-center
justify-center h-full space-y-3'
>
<
div
className=
'
w-0 grow flex flex-col items-center px-8
justify-center h-full space-y-3'
>
{
noDataIcon
}
{
noDataIcon
}
<
div
className=
'text-[13px] text-gray-400'
>
{
t
(
'appDebug.automatic.noData'
)
}
</
div
>
<
div
className=
'text-[13px] text-gray-400'
>
{
t
(
'appDebug.automatic.noData'
)
}
</
div
>
</
div
>
</
div
>
...
@@ -142,7 +142,7 @@ const GetAutomaticRes: FC<IGetAutomaticResProps> = ({
...
@@ -142,7 +142,7 @@ const GetAutomaticRes: FC<IGetAutomaticResProps> = ({
<
div
className=
'text-[13px] font-normal text-gray-500'
>
{
t
(
'appDebug.automatic.description'
)
}
</
div
>
<
div
className=
'text-[13px] font-normal text-gray-500'
>
{
t
(
'appDebug.automatic.description'
)
}
</
div
>
</
div
>
</
div
>
{
/* inputs */
}
{
/* inputs */
}
<
div
className=
'mt-
1
2 space-y-5'
>
<
div
className=
'mt-2 space-y-5'
>
<
div
className=
'space-y-2'
>
<
div
className=
'space-y-2'
>
<
div
className=
'text-[13px] font-medium text-gray-900'
>
{
t
(
'appDebug.automatic.intendedAudience'
)
}
</
div
>
<
div
className=
'text-[13px] font-medium text-gray-900'
>
{
t
(
'appDebug.automatic.intendedAudience'
)
}
</
div
>
<
input
className=
"w-full h-8 px-3 text-[13px] font-normal bg-gray-50 rounded-lg"
placeholder=
{
t
(
'appDebug.automatic.intendedAudiencePlaceHolder'
)
as
string
}
value=
{
audiences
}
onChange=
{
e
=>
setAudiences
(
e
.
target
.
value
)
}
/>
<
input
className=
"w-full h-8 px-3 text-[13px] font-normal bg-gray-50 rounded-lg"
placeholder=
{
t
(
'appDebug.automatic.intendedAudiencePlaceHolder'
)
as
string
}
value=
{
audiences
}
onChange=
{
e
=>
setAudiences
(
e
.
target
.
value
)
}
/>
...
@@ -167,8 +167,8 @@ const GetAutomaticRes: FC<IGetAutomaticResProps> = ({
...
@@ -167,8 +167,8 @@ const GetAutomaticRes: FC<IGetAutomaticResProps> = ({
</
div
>
}
</
div
>
}
{
(
!
isLoading
&&
res
)
&&
(
{
(
!
isLoading
&&
res
)
&&
(
<
div
className=
'grow px-8 pt-6 h-full overflow-y-auto'
>
<
div
className=
'
w-0
grow px-8 pt-6 h-full overflow-y-auto'
>
<
div
className=
'mb-4
w-1/2
text-lg font-medium text-gray-900'
>
{
t
(
'appDebug.automatic.resTitle'
)
}
</
div
>
<
div
className=
'mb-4 text-lg font-medium text-gray-900'
>
{
t
(
'appDebug.automatic.resTitle'
)
}
</
div
>
<
ConfigPrompt
<
ConfigPrompt
mode=
{
mode
}
mode=
{
mode
}
...
@@ -196,7 +196,7 @@ const GetAutomaticRes: FC<IGetAutomaticResProps> = ({
...
@@ -196,7 +196,7 @@ const GetAutomaticRes: FC<IGetAutomaticResProps> = ({
</
div
>
</
div
>
)
}
)
}
<
div
className=
'sticky bottom-0 flex justify-end right-0 py-4'
>
<
div
className=
'sticky bottom-0 flex justify-end right-0 py-4
bg-white
'
>
<
Button
onClick=
{
onClose
}
>
{
t
(
'common.operation.cancel'
)
}
</
Button
>
<
Button
onClick=
{
onClose
}
>
{
t
(
'common.operation.cancel'
)
}
</
Button
>
<
Button
type=
'primary'
className=
'ml-2'
onClick=
{
()
=>
{
<
Button
type=
'primary'
className=
'ml-2'
onClick=
{
()
=>
{
setShowConfirmOverwrite
(
true
)
setShowConfirmOverwrite
(
true
)
...
...
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