Skip to content

Open-source Grok Bot alternative with a virtual machine that bots can use

fix(chat): pass the clicked link so the delivered copy resolves by source

meutex7f31c114c90f
diff --git a/server/routes/threads.ts b/server/routes/threads.ts
index 5603dfc398..a962f2a187 100644
--- a/server/routes/threads.ts
+++ b/server/routes/threads.ts
@@ -269,7 +269,7 @@ export function createThreadRoutes(deps: ThreadRouteDeps): RouteHandler {
const name = message.role === "bot" && !botAttachment && !folderEntry && (code === "outside_workspace" || status === 404)
? referencedFileName(href)
: null;
- const copy = name ? deliveredCopy(store.messagesFor(threadId), message, name) : null;
+ const copy = name ? deliveredCopy(store.messagesFor(threadId), message, name, href) : null;
if (copy) {
file = await openMessageFile(copy.path, [ATTACHMENTS_DIR], maxBytes);
downloadName = copy.name;