-
Notifications
You must be signed in to change notification settings - Fork 169
Open
Labels
ask_sbIssue related to Ask Sourcebot. https://docs.sourcebot.dev/docs/features/ask/overviewIssue related to Ask Sourcebot. https://docs.sourcebot.dev/docs/features/ask/overviewbugSomething isn't workingSomething isn't workingtriage needed
Description
Describe the bug
Copying a Ask response as Markdown will return source file links that are relative and not absolute. This makes things non-portable, depending on where the Markdown is pasted. For example, here is a snippet produced by ask. Try clicking on the IndexBuilder.Add() link. It will 404.
You're absolutely correct! The primary reason PDFs and other binary files are skipped is because they contain null bytes (0x00), not just because of size limits or trigram counts.
The Null Byte Check
In IndexBuilder.Add() indexbuilder.go:428-431:
To reproduce
Create a Ask response with a source link
Sourcebot deployment information
Sourcebot version (e.g. v3.0.1): Latest
Additional information
We should resolve these links as absolute links within the code host, that way they are portable.
Metadata
Metadata
Assignees
Labels
ask_sbIssue related to Ask Sourcebot. https://docs.sourcebot.dev/docs/features/ask/overviewIssue related to Ask Sourcebot. https://docs.sourcebot.dev/docs/features/ask/overviewbugSomething isn't workingSomething isn't workingtriage needed