diff --git a/.changeset/smooth-wolves-admire.md b/.changeset/smooth-wolves-admire.md new file mode 100644 index 0000000000000000000000000000000000000000..547187d7c888b0c642f40a67b02589fa8d365a48 --- /dev/null +++ b/.changeset/smooth-wolves-admire.md @@ -0,0 +1,5 @@ +--- +"create-llama": patch +--- + +DocumentInfo working with relative URLs diff --git a/templates/types/streaming/nextjs/app/components/ui/chat/chat-message/markdown.tsx b/templates/types/streaming/nextjs/app/components/ui/chat/chat-message/markdown.tsx index 8682a802ec75e576a1ea938c3a1483cac6ce1b4a..9074e208d20e2e03300a567be352aba1a6fd1297 100644 --- a/templates/types/streaming/nextjs/app/components/ui/chat/chat-message/markdown.tsx +++ b/templates/types/streaming/nextjs/app/components/ui/chat/chat-message/markdown.tsx @@ -134,7 +134,9 @@ export default function Markdown({ return ( <DocumentInfo document={{ - url: new URL(decodeURIComponent(href)).href, + url: backend + ? new URL(decodeURIComponent(href)).href + : href, sources: [], }} className="mb-2 mt-2"