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
efbc8468
Commit
efbc8468
authored
Jul 21, 2023
by
Joel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: though ui
parent
32c02a2b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
+7
-3
index.tsx
web/app/components/app/chat/thought/index.tsx
+3
-3
style.module.css
web/app/components/app/chat/thought/style.module.css
+4
-0
No files found.
web/app/components/app/chat/thought/index.tsx
View file @
efbc8468
...
...
@@ -30,13 +30,13 @@ const Thought: FC<IThoughtProps> = ({
const
[
isShowDetail
,
setIsShowDetail
]
=
React
.
useState
(
false
)
const
renderItem
=
(
item
:
ThoughtItem
)
=>
(
<
div
className=
'flex space-x-1
items-center h-6
'
key=
{
item
.
id
}
>
<
div
className=
'shrink-0'
>
{
getIcon
(
item
.
tool
)
}
</
div
>
<
div
className=
'flex space-x-1
py-[3px] leading-[18px]
'
key=
{
item
.
id
}
>
<
div
className=
'
flex items-center h-[18px]
shrink-0'
>
{
getIcon
(
item
.
tool
)
}
</
div
>
<
div
>
{
item
.
thought
}
</
div
>
</
div
>
)
return
(
<
div
className=
{
cn
(
s
.
wrap
,
'inline-block mb-2 px-2 py-0.5 rounded-md text-xs text-gray-500 font-medium'
)
}
>
<
div
className=
{
cn
(
s
.
wrap
,
!
isShowDetail
&&
s
.
wrapHoverEffect
,
'inline-block mb-2 px-2 py-0.5 rounded-md text-xs text-gray-500 font-medium'
)
}
>
<
div
className=
'flex items-center h-6 space-x-1 cursor-pointer'
onClick=
{
()
=>
setIsShowDetail
(
!
isShowDetail
)
}
>
<
ThoughtList
/>
<
div
>
{
t
(
`explore.universalChat.thought.${isShowDetail ? 'hide' : 'show'}`
)
}{
t
(
'explore.universalChat.thought.processOfThought'
)
}
</
div
>
...
...
web/app/components/app/chat/thought/style.module.css
View file @
efbc8468
.wrap
{
background-color
:
rgba
(
255
,
255
,
255
,
0.92
);
}
.wrapHoverEffect
:hover
{
box-shadow
:
0px
1px
2px
0px
rgba
(
16
,
24
,
40
,
0.06
),
0px
1px
3px
0px
rgba
(
16
,
24
,
40
,
0.1
);
}
\ No newline at end of file
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