-
Notifications
You must be signed in to change notification settings - Fork 965
Add search query and summary from Brave Search SERP when open Leo chat #25257
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
Conversation
329282a
to
fd85005
Compare
ef1209f
to
3147a27
Compare
8be906b
to
a9b050c
Compare
a9b050c
to
a76efc8
Compare
A Storybook has been deployed to preview UI for the latest push |
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.
LGTM - on thing which is slightly odd to me on this is that we have the data on the page already, so it feels slightly weird to make an API call to fetch it, after parsing the API key from the page.
Maybe pulling the data out from the page is more complicated though?
edit: read the spec
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.
still lgtm
} | ||
|
||
if (!api_request_helper_) { | ||
api_request_helper_ = |
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.
noting that this looks like a Tor bypass if this feature were available in Tor windows, but i don't think it is at the moment
would suggest adding a test for the not-opted-into-leo case to the test plan |
components/ai_chat/core/browser/conversation_driver_unittest.cc
Outdated
Show resolved
Hide resolved
- Add search query and summary from Brave Search SERP to conversation history when summarizer-key tag is present. - Also add a new from_brave_SERP property in ConversationTurn to identify the conversation entries from Brave Search SERP. - Modify UI to show the page context toggle when search query and summary are staged. - Staged search query and summary (at the end of the conversation history) will be cleared if user opted out, page was unlinked, or navigated to a new page.
86e52cb
to
494f3a1
Compare
[puLL-Merge] - brave/brave-core@25257 Here's my review of the pull request: DescriptionThis PR adds functionality to fetch and display search query summaries from Brave Search SERP (Search Engine Results Page) in the AI Chat feature. It includes changes to handle the retrieval, parsing, and integration of these summaries into the conversation history. The PR also adds unit tests and browser tests to cover the new functionality. ChangesChanges
Possible Issues
Security Hotspots
Overall, the changes appear well-structured and include appropriate test coverage. However, due to the complexity of the changes and the introduction of new network requests, thorough testing and security review are recommended before merging. |
Resolves brave/brave-browser#40615
history when summarizer-key tag is present.
conversation entries from Brave Search SERP.
staged.
be cleared if user opted out, page was unlinked, or user navigated away to a new page
For more details, please check requirement # 1 in https://docs.google.com/document/d/1idelFPpUEcKDNcyKYf3M5yw91tuIddjrlYfpaWEJjNk/edit
Security/Privacy review: https://github.com/brave/reviews/issues/1732
Submitter Checklist:
QA/Yes
orQA/No
;release-notes/include
orrelease-notes/exclude
;OS/...
) to the associated issuenpm run test -- brave_browser_tests
,npm run test -- brave_unit_tests
wikinpm run presubmit
wiki,npm run gn_check
,npm run tslint
git rebase master
(if needed)Reviewer Checklist:
gn
After-merge Checklist:
changes has landed on
Test Plan:
Answer with AI