Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sdream-ai-fe
Overview
Overview
Details
Activity
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
侯明涛
sdream-ai-fe
Commits
831bae4f
Commit
831bae4f
authored
Jan 23, 2025
by
HoMeTown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 增加qaTime的显示
parent
24f867a4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
1 deletions
+6
-1
src/pages/Chat/components/ChatItem/ChatAnswerBox.tsx
+2
-1
src/pages/Chat/components/ChatItem/ChatAnswerParser.tsx
+2
-0
src/pages/Chat/components/ChatItem/ChatAnswerShower.tsx
+1
-0
src/pages/Chat/components/ChatItem/ChatItemUser.tsx
+1
-0
No files found.
src/pages/Chat/components/ChatItem/ChatAnswerBox.tsx
View file @
831bae4f
...
@@ -54,7 +54,7 @@ export const ChatAnswerBox: React.FC<ChatAnswerBoxProps> = ({ record, showIndex,
...
@@ -54,7 +54,7 @@ export const ChatAnswerBox: React.FC<ChatAnswerBoxProps> = ({ record, showIndex,
<
div
className=
"flex"
>
<
div
className=
"flex"
>
<
Avatar
className=
"sm:mr-[20px] hidden sm:block flex-shrink-0"
src=
{
AvatarBot
}
/>
<
Avatar
className=
"sm:mr-[20px] hidden sm:block flex-shrink-0"
src=
{
AvatarBot
}
/>
<
div
<
div
className=
"bg-white rounded-[20px] box-border px-[16px] py-[12px] sm:px-[24px] sm:py-[20px]"
className=
"bg-white rounded-[20px] box-border px-[16px] py-[12px] sm:px-[24px] sm:py-[20px]
relative
"
>
>
{
(
item
.
answer
?.
length
||
item
.
cardList
?.
length
)
{
(
item
.
answer
?.
length
||
item
.
cardList
?.
length
)
?
(
?
(
...
@@ -64,6 +64,7 @@ export const ChatAnswerBox: React.FC<ChatAnswerBoxProps> = ({ record, showIndex,
...
@@ -64,6 +64,7 @@ export const ChatAnswerBox: React.FC<ChatAnswerBoxProps> = ({ record, showIndex,
</
div
>
</
div
>
)
)
:
<
SdreamLoading
/>
}
:
<
SdreamLoading
/>
}
</
div
>
</
div
>
<
div
className=
"hidden sm:block w-[65px] flex-shrink-0"
></
div
>
<
div
className=
"hidden sm:block w-[65px] flex-shrink-0"
></
div
>
</
div
>
</
div
>
...
...
src/pages/Chat/components/ChatItem/ChatAnswerParser.tsx
View file @
831bae4f
...
@@ -176,6 +176,8 @@ export const ChatAnswerParser: React.FC<ChatAnswerParserProps> = ({ isLastAnswer
...
@@ -176,6 +176,8 @@ export const ChatAnswerParser: React.FC<ChatAnswerParserProps> = ({ isLastAnswer
&&
<
ChatAnswerAttachment
fromParser
isLastAnswer=
{
isLastAnswer
}
onSubmitQuestion=
{
onSubmitQuestion
}
answer=
{
answer
}
/>
}
&&
<
ChatAnswerAttachment
fromParser
isLastAnswer=
{
isLastAnswer
}
onSubmitQuestion=
{
onSubmitQuestion
}
answer=
{
answer
}
/>
}
{
!
isTyping
&&
!
hideOperate
&&
<
ChatAnswerOperate
answer=
{
answer
}
/>
}
{
!
isTyping
&&
!
hideOperate
&&
<
ChatAnswerOperate
answer=
{
answer
}
/>
}
{
!
isTyping
&&
<
div
className=
"flex text-[10px] right-[16px] text-[#d0d1d2] bottom-[4px]"
>
AI生成
</
div
>
}
</
div
>
</
div
>
)
)
}
}
src/pages/Chat/components/ChatItem/ChatAnswerShower.tsx
View file @
831bae4f
...
@@ -24,6 +24,7 @@ export const ChatAnswerShower: React.FC<ChatAnswerShowerProps> = ({ answer, isLa
...
@@ -24,6 +24,7 @@ export const ChatAnswerShower: React.FC<ChatAnswerShowerProps> = ({ answer, isLa
{
answer
.
cardList
&&
answer
.
cardList
?.
length
!==
0
&&
<
ChatAnswerAttachment
onSubmitQuestion=
{
onSubmitQuestion
}
isLastAnswer=
{
isLastAnswer
}
answer=
{
answer
}
/>
}
{
answer
.
cardList
&&
answer
.
cardList
?.
length
!==
0
&&
<
ChatAnswerAttachment
onSubmitQuestion=
{
onSubmitQuestion
}
isLastAnswer=
{
isLastAnswer
}
answer=
{
answer
}
/>
}
{
/* {} */
}
{
/* {} */
}
{
!
hideOperate
&&
<
ChatAnswerOperate
answer=
{
answer
}
/>
}
{
!
hideOperate
&&
<
ChatAnswerOperate
answer=
{
answer
}
/>
}
<
div
className=
"flex text-[10px] right-[16px] text-[#d0d1d2] bottom-[4px]"
>
AI生成
</
div
>
</
div
>
</
div
>
)
)
}
}
src/pages/Chat/components/ChatItem/ChatItemUser.tsx
View file @
831bae4f
...
@@ -9,6 +9,7 @@ interface ChatItemUserProps {
...
@@ -9,6 +9,7 @@ interface ChatItemUserProps {
export
const
ChatItemUser
:
React
.
FC
<
ChatItemUserProps
>
=
({
record
})
=>
{
export
const
ChatItemUser
:
React
.
FC
<
ChatItemUserProps
>
=
({
record
})
=>
{
return
(
return
(
<
div
className=
"chatItemUser"
>
<
div
className=
"chatItemUser"
>
<
div
className=
"text-[#b9b9bb] text-[13px] text-center w-full"
>
{
record
.
qaTime
}
</
div
>
<
div
className=
"flex justify-end"
>
<
div
className=
"flex justify-end"
>
<
div
className=
"sm:block w-[65px] flex-shrink-0"
></
div
>
<
div
className=
"sm:block w-[65px] flex-shrink-0"
></
div
>
<
div
className=
"text-[15px] bg-[#29B6FD] rounded-[20px] box-border text-[#fff] px-[16px] py-[12px] sm:px-[24px] sm:py-[20px]"
>
{
record
.
question
}
</
div
>
<
div
className=
"text-[15px] bg-[#29B6FD] rounded-[20px] box-border text-[#fff] px-[16px] py-[12px] sm:px-[24px] sm:py-[20px]"
>
{
record
.
question
}
</
div
>
...
...
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