Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5f768e5c83 | |||
| 01a1c55de8 |
@@ -69,3 +69,5 @@ Desktop.ini
|
||||
*.coverage
|
||||
.coverage
|
||||
htmlcov/
|
||||
|
||||
officefile
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
|
||||
<rect width="32" height="32" rx="6" fill="#2563eb"/>
|
||||
<text x="16" y="22" font-family="Arial,sans-serif" font-size="18" font-weight="bold" fill="white" text-anchor="middle">国</text>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 255 B |
@@ -252,10 +252,14 @@ export default function MessageItem({ message, selectedModel }: MessageItemProps
|
||||
td: ({ children }) => (
|
||||
<td className="border border-border px-2 py-1.5">{children}</td>
|
||||
),
|
||||
img: ({ src, alt }: any) => (
|
||||
<a href={src} target="_blank" rel="noopener noreferrer" className="block my-3 group">
|
||||
img: ({ src, alt }: any) => {
|
||||
const resolvedSrc = src && src.startsWith("/")
|
||||
? `${process.env.NEXT_PUBLIC_API_URL || `${window.location.protocol}//${window.location.hostname}:8000`}${src}`
|
||||
: src;
|
||||
return (
|
||||
<a href={resolvedSrc} target="_blank" rel="noopener noreferrer" className="block my-3 group">
|
||||
<img
|
||||
src={src}
|
||||
src={resolvedSrc}
|
||||
alt={alt || "图片来源"}
|
||||
loading="lazy"
|
||||
className="max-w-full max-h-80 rounded-lg border border-border/50 cursor-pointer
|
||||
@@ -267,7 +271,7 @@ export default function MessageItem({ message, selectedModel }: MessageItemProps
|
||||
</span>
|
||||
)}
|
||||
</a>
|
||||
),
|
||||
)},
|
||||
}}
|
||||
>
|
||||
{preprocessCitations(message.content, String(message.id))}
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user