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
7c315e1e
Commit
7c315e1e
authored
Jan 23, 2025
by
HoMeTown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 参考文档
parent
831bae4f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
src/pages/Chat/components/ChatItem/ChatAnswerAttchment.tsx
+4
-4
No files found.
src/pages/Chat/components/ChatItem/ChatAnswerAttchment.tsx
View file @
7c315e1e
...
@@ -26,15 +26,15 @@ export const ChatAnswerAttachment: React.FC<ChatAnswerAttachmentProps> = ({ from
...
@@ -26,15 +26,15 @@ export const ChatAnswerAttachment: React.FC<ChatAnswerAttachmentProps> = ({ from
window
.
open
(
attachment
.
content
.
url
)
window
.
open
(
attachment
.
content
.
url
)
}
}
const
handleClickDocLink
=
async
(
doc
Id
:
string
)
=>
{
const
handleClickDocLink
=
async
(
doc
umentStoreKey
:
string
)
=>
{
if
(
fromParser
)
{
if
(
fromParser
)
{
const
res
=
await
fetchGetDocumentLink
(
doc
Id
)
const
res
=
await
fetchGetDocumentLink
(
doc
umentStoreKey
)
if
(
res
.
data
)
{
if
(
res
.
data
)
{
window
.
open
(
res
.
data
.
docUrl
)
window
.
open
(
res
.
data
.
docUrl
)
}
}
}
}
else
{
else
{
window
.
open
(
doc
Id
)
window
.
open
(
doc
umentStoreKey
)
}
}
}
}
return
(
return
(
...
@@ -64,7 +64,7 @@ export const ChatAnswerAttachment: React.FC<ChatAnswerAttachmentProps> = ({ from
...
@@ -64,7 +64,7 @@ export const ChatAnswerAttachment: React.FC<ChatAnswerAttachmentProps> = ({ from
</
p
>
</
p
>
<
div
className=
"flex flex-col gap-[9px]"
>
<
div
className=
"flex flex-col gap-[9px]"
>
{
attachment
.
content
.
docList
.
map
(
doc
=>
(
{
attachment
.
content
.
docList
.
map
(
doc
=>
(
<
Link
className=
"cursor-pointer"
onPress=
{
()
=>
handleClickDocLink
(
doc
.
document
Name
)
}
size=
"sm"
key=
{
doc
.
documentName
}
isExternal
showAnchorIcon
underline=
"hover"
>
<
Link
className=
"cursor-pointer"
onPress=
{
()
=>
handleClickDocLink
(
doc
.
document
StoreKey
)
}
size=
"sm"
key=
{
doc
.
documentStoreKey
}
isExternal
showAnchorIcon
underline=
"hover"
>
{
doc
.
documentAlias
}
{
doc
.
documentAlias
}
</
Link
>
</
Link
>
))
}
))
}
...
...
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