-
Notifications
You must be signed in to change notification settings - Fork 888
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
Open Leo from search #26082
Open Leo from search #26082
Conversation
dce4a3c
to
1f2c4c1
Compare
A Storybook has been deployed to preview UI for the latest push |
0c99be2
to
9ef822a
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.
Leaving some comments for now. Be back later.
browser/ui/ai_chat/ai_chat_brave_search_throttle_delegate_impl.h
Outdated
Show resolved
Hide resolved
c973c0b
to
0db3a85
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.
Nice work - my review mainly focuses on naming and keeping consistent with "AI Chat" and not "Leo" - sorry!
chromium_src/components/content_settings/core/common/content_settings_types.mojom
Outdated
Show resolved
Hide resolved
chromium_src/components/content_settings/core/common/content_settings_types.mojom
Outdated
Show resolved
Hide resolved
components/ai_chat/content/browser/ai_chat_brave_search_throttle.h
Outdated
Show resolved
Hide resolved
components/permissions/contexts/brave_ai_chat_permission_context.h
Outdated
Show resolved
Hide resolved
763155e
to
be1b396
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.
👍
const RequestType kExcludedTypes[] = {RequestType::kDiskQuota, | ||
RequestType::kMultipleDownloads, | ||
#if BUILDFLAG(IS_ANDROID) | ||
RequestType::kProtectedMediaIdentifier, | ||
RequestType::kProtectedMediaIdentifier, | ||
#else | ||
RequestType::kRegisterProtocolHandler, | ||
#endif // BUILDFLAG(IS_ANDROID) | ||
#if BUILDFLAG(ENABLE_WIDEVINE) | ||
RequestType::kWidevine | ||
RequestType::kWidevine |
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.
nit: what's happened here with whitespace change?
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.
vscode auto formatting, seems to be a good format tho.
- Add a new permission for opening Leo from Brave Search - Add a NavigationThrottle to intercept specific URL requests and open Leo
e882251
to
b7d48f3
Compare
[puLL-Merge] - brave/brave-core@26082 DescriptionThis pull request adds functionality to open Leo AI chat from Brave Search. It includes new permission settings, UI elements, and backend logic to handle the feature. The changes span across multiple components including browser settings, content settings, permissions, and AI chat-related modules. Possible Issues
Security Hotspots
ChangesChanges
These changes collectively implement the feature to open Leo AI chat from Brave Search, including necessary permissions, settings, and backend logic. |
Released in v1.73.66 |
@yrliou don't know if this is already reported but site settings are failing to load with I think maybe we removed |
Verification passed on
|
* Uplift of #26082 (squashed) to beta * Fix site settings --------- Co-authored-by: Jocelyn Liu <[email protected]>
Resolves brave/brave-browser#41711
open_leo_from_search_480p.mov
UI was updated on search side after the above demo video was recorded, it now looks like this, with a "Save chat in Brave Leo" at upper-right corner:
See Requirements
#2
and#3
in https://docs.google.com/document/d/1idelFPpUEcKDNcyKYf3M5yw91tuIddjrlYfpaWEJjNk/edit?tab=t.0 for reference.S&P review: https://github.com/brave/reviews/issues/1776
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
Test opt-out case:
Try the feature in a profile that hasn't opted-in to Leo, when the continue with Leo button is clicked, accept the permission prompt, Leo should be opened with opt-in screen with disclaimer, search entries should appear after opt-in.
Test private window:
Try the feature in private window, shouldn't have any actions such as opening Leo or permission prompt.