-
Notifications
You must be signed in to change notification settings - Fork 200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
support @-mentioning URLs to use web page contents as context #3436
Conversation
cb6b1df
to
55ac1a0
Compare
0b2d412
to
4c8cd77
Compare
55ac1a0
to
885bb97
Compare
885bb97
to
6b0597b
Compare
7edd060
to
0489c09
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love the idea but I am unsure how useful this is because this won't work well if the website depends on JS to render its content and there's no way a user would notice when it's not working well right now. It also requires users to know the URL in which case they probably have it open in a browser already and it would be much more reliable for them to just copy-paste the content instead.
I think it's fine behind an experimental setting if the plan is to see how ergonomic it is but if we do want to move forward with it, we probably need a proper html client (ideally something like Playwright that can load the website and then extract the text) which adds a lot of complexity to this feature.
V cool. Sadly I couldn't get the @-URL to tokenise and be used when testing this branch… I was keen to give it a try! Did it work for you @philipp-spiess? |
This comment was marked as resolved.
This comment was marked as resolved.
Got it working! I typo'd the JSON config to enable it 🤦🏼♂️ Worked well with Playwright docs. For code docs in particular, it'd be nice to cut out the browser eventually. Being able to index the whole Playwright docs for example, and then being able to @-search the page titles to include the relevant page, vs copy and pasting from a browser. But it's good to be able to attach an arbitrary thing into the chat as needed. There's probably a heap of use cases based on this we haven't even considered. |
6b0597b
to
7d6d5b5
Compare
Yes, agreed. This exposes a (future) gap in how we show context for things that aren't a file range in the current editor or linkable to a range on Sourcegraph. My intent is to keep it experimental to have a way to start exposing these gaps. Also the point about how there are errors shown with each keystroke. I'll see how I can fix that even before merging this. |
82ea358
to
620bfab
Compare
This is an experimental (off-by-default) feature that lets you, in chat, @-mention web pages by URL to include their text contents as context for the LLM. For example, you can type `what are the books listed at @https://slack.org/reading` into chat, select the context item in the menu, and then press Enter, and Cody will read the contents of that web page. Requires the experimental and undocumented `"cody.experimental.urlContext": true` VS Code setting. This is just something we can experiment with internally for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@abeatrix that tooltip idea is a good one. I'll add that in a followup. |
community member: "bro this is a effen game changer" Amazing work @sqs |
This is an experimental (off-by-default) feature that lets you, in chat, @-mention web pages by URL to include their text contents as context for the LLM. For example, you can type
what are the books listed at @https://slack.org/reading
into chat, select the context item in the menu, and then press Enter, and Cody will read the contents of that web page.Requires the experimental and undocumented
"cody.experimental.urlContext": true
VS Code setting (or thecody-url-context
feature flag, which I enabled for all sourcegraph org members on dotcom).This is just something we can experiment with internally for now.
Loom video (below)
@-mentioning.web.pages.by.URL.in.Cody.experimental.mp4
Test plan
CI