-
Notifications
You must be signed in to change notification settings - Fork 873
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
Fetch staged entries from Brave Search before opt-in to Leo #26424
Conversation
… no entries - This avoid us falling into the situation where users need to click on summarize the page to continue the opt-in flow when user first open Leo from Brave Search. - There are still no requests will be sent to AI chat server unless user opts in. This only allows the request to fetch from Brave Search backend.
@@ -1047,8 +1047,7 @@ void ConversationHandler::MaybeFetchOrClearContentStagedConversation() { | |||
} | |||
|
|||
const bool can_check_for_staged_conversation = | |||
ai_chat_service_->HasUserOptedIn() && IsContentAssociationPossible() && | |||
should_send_page_contents_; | |||
IsContentAssociationPossible() && should_send_page_contents_; |
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.
are the staged entries just the local chat history? so nothing is fetched from any servers to get the staged conversation.
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.
Staged entries are fetched from Brave Search server.
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.
@yrliou that's the only case in which they are fetched from a server?
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.
Currently, yes, our only source of staged entries is Brave Search server.
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 but @ShivanKaul should also look
A Storybook has been deployed to preview UI for the latest push |
Released in v1.75.4 |
Verification passed on
26424.mp4 |
Open via continue with Leo button from Brave Search:
Screen.Recording.2024-11-06.at.12.32.27.PM.mov
Open Leo manually:
Screen.Recording.2024-11-06.at.12.59.59.PM.mov
Note that this changes requirement 1.6 in https://docs.google.com/document/d/1idelFPpUEcKDNcyKYf3M5yw91tuIddjrlYfpaWEJjNk/edit?tab=t.0, tagging @diracdeltas and @ShivanKaul here to make sure it's okay from security and privacy perspective. Will update the spec once this change is approved.
Edit: above has been updated to reflect the change in this PR.
Resolves brave/brave-browser#42112
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: