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
e54c9b0a
Commit
e54c9b0a
authored
Jan 23, 2025
by
HoMeTown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 参考文档的处理
parent
ae1820bb
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
9 deletions
+12
-9
src/pages/Chat/components/ChatItem/ChatAnswerAttchment.tsx
+3
-3
src/pages/Chat/components/ChatItem/ChatAnswerBox.tsx
+1
-1
src/pages/Chat/components/ChatWelcome/index.tsx
+2
-2
src/pages/Home/Home.tsx
+1
-1
src/types/chat.ts
+5
-2
No files found.
src/pages/Chat/components/ChatItem/ChatAnswerAttchment.tsx
View file @
e54c9b0a
...
...
@@ -48,7 +48,7 @@ export const ChatAnswerAttachment: React.FC<ChatAnswerAttachmentProps> = ({ from
<
div
className=
"bg-[#29B6FD0A] text-[14px] text-primary py-[4px] px-[16px] w-fit flex items-center"
>
<
AnswerProDetailIcon
/>
{
/* <span className="ml-[6px]">{attachment.name}</span> */
}
<
div
className=
"ml-[6px]
w-[150px]
sm:w-full text-nowrap text-ellipsis overflow-hidden"
>
<
div
className=
"ml-[6px]
max-w-full
sm:w-full text-nowrap text-ellipsis overflow-hidden"
>
{
attachment
.
name
}
</
div
>
</
div
>
...
...
@@ -64,11 +64,11 @@ export const ChatAnswerAttachment: React.FC<ChatAnswerAttachmentProps> = ({ from
</
p
>
<
div
className=
"flex flex-col gap-[9px]"
>
{
attachment
.
content
.
docList
.
map
((
doc
,
docIdx
)
=>
(
<
Link
className=
"cursor-pointer"
onPress=
{
()
=>
handleClickDocLink
(
doc
.
doc
Id
)
}
size=
"sm"
key=
{
doc
.
docId
}
isExternal
showAnchorIcon
underline=
"hover"
>
<
Link
className=
"cursor-pointer"
onPress=
{
()
=>
handleClickDocLink
(
doc
.
doc
umentName
)
}
size=
"sm"
key=
{
doc
.
documentName
}
isExternal
showAnchorIcon
underline=
"hover"
>
{
docIdx
+
1
}
.
{
' '
}
{
doc
.
doc
Name
}
{
doc
.
doc
umentAlias
}
</
Link
>
))
}
</
div
>
...
...
src/pages/Chat/components/ChatItem/ChatAnswerBox.tsx
View file @
e54c9b0a
...
...
@@ -54,7 +54,7 @@ export const ChatAnswerBox: React.FC<ChatAnswerBoxProps> = ({ record, showIndex,
<
div
className=
"flex"
>
<
Avatar
className=
"flex-shrink-0"
src=
{
AvatarBot
}
/>
<
div
className=
"ml-[20px] bg-white rounded-[20px] box-border px-[16px] py-[12px] sm:px-[24px] sm:py-[20px]"
className=
"ml-[
12px] sm:ml-[
20px] bg-white rounded-[20px] box-border px-[16px] py-[12px] sm:px-[24px] sm:py-[20px]"
>
{
(
item
.
answer
?.
length
||
item
.
cardList
?.
length
)
?
(
...
...
src/pages/Chat/components/ChatWelcome/index.tsx
View file @
e54c9b0a
...
...
@@ -9,11 +9,11 @@ export const ChatWelcome: React.FC = () => {
<
div
className=
"flex"
>
<
Avatar
className=
"flex-shrink-0"
src=
{
AvatarBot
}
/>
<
motion
.
div
className=
"ml-[20px] bg-white rounded-[20px] box-border px-[16px] py-[12px] sm:px-[24px] sm:py-[20px]"
className=
"ml-[
12px] sm:ml-[
20px] bg-white rounded-[20px] box-border px-[16px] py-[12px] sm:px-[24px] sm:py-[20px]"
>
<
div
className=
"content"
>
<
p
className=
"text-[16px] sm:text-[18px] font-medium text-[#333]"
>
您好,我是晓得
</
p
>
<
p
className=
"text-[15px] mt-[8px] sm:text-13px text-[#27353C] font-300"
>
作为您的智能保险伙伴,您有各类专业相关的问题都可以抛给我哟~让我们互相帮助共同成长吧~
</
p
>
<
p
className=
"text-[15px]
sm:
mt-[8px] sm:text-13px text-[#27353C] font-300"
>
作为您的智能保险伙伴,您有各类专业相关的问题都可以抛给我哟~让我们互相帮助共同成长吧~
</
p
>
</
div
>
</
motion
.
div
>
</
div
>
...
...
src/pages/Home/Home.tsx
View file @
e54c9b0a
...
...
@@ -55,7 +55,7 @@ export const Home: React.FC = () => {
<
div
className=
"box flex flex-col h-full w-full"
>
<
div
className=
"flex-1 sm:flex items-center pt-[24px] overflow-y-scroll sm:pt-[32px] scrollbar-hide sm:overflow-hidden"
>
<
div
className=
"w-full"
>
<
div
className=
"px-[
1
2px] pb-[24px] sm:px-0"
>
<
div
className=
"px-[
2
2px] pb-[24px] sm:px-0"
>
{
/* slogan */
}
<
Slogan
/>
...
...
src/types/chat.ts
View file @
e54c9b0a
interface
AttachmentContentDoc
{
docId
:
string
docName
:
string
knowledgeName
:
string
collectionName
:
string
documentName
:
string
documentAlias
:
string
documentStoreKey
:
string
}
interface
AttachmentContentProduct
{
...
...
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