The test was checking document.title before the async WebAudio operations completed.
Changed it to await the promise resolution instead of an immediate title check.
The list was not updated nor maintained, and even had invalid entries.
On device which uses a local ML model was tied to this preference for some reason too, so that keeps the preference around and has a checkbox for just that now.
For Android, it doesn't support on device suggestions because the ML
models aren't available there, so no checkbox was added there.
Show "Use darker theme" toggle unless it's light mode
According design requirement, we need to show "Use darker theme" toggle
unless it's light mode. This is because in light mode the toggle doesn't
have any effect.
As this method is being called multiple times through the bubble's lifecycle,
and title_tf_ can be null on the first call, we don't need to DCHECK.
The title_tf_ will be valid before the second call.
Add Brave Browser Policy Provider
Adds a Brave browser-level policy provider.
In future work, it will handle global scope policies in Brave Origin.
The provider integrates with Chromium's BrowserPolicyConnector to supply policy management for local state prefs.
* Guard `ui/color` properly with `toolkit_views`
Currently, we're using `!is_android` or doesn't have proper guard at all.
This change puts `toolkit_views` to guard `ui/color` code correctly.
* Split darker_theme related code to a new target
* Address code review(reposition comment and code)
* Make darker_theme_unittest.cc
This PR changes ConversationHandler::OnEngineCompletionComplete which is
called when an assistance response generation is completed. When we
received the completion of the first assistant response in the
conversation, for engines which require a client side title generation
(all custom models), after reporting the conversation history updates
from the agent response to UI, we keep request_in_progress_ to be true
and send a separate title generation request. Previous actions which
happen in the end of assistance completion will be performed after title
generation is done regardless of whether the title generation is
successful or not.
This PR also implements GenerateConversationTitle in OAI engine, which
mimics what we do on the server side for conversation API engines. We
first create messages with attach associated content up to 1200 chars
each. Then append a message for requesting title using the same title
prompt we have on server side, which would include first user turn's
text or the first assistant response's text (if there are uploaded
files) in the content. Lastly, append a message for seeding the
response and use </title> as the stop sequence. A successful title
response with title less than 100 chars will be used to update the
conversation title, otherwise it would just be dropped or failed
silently.
This change replaces the JS unzipper which was removed in Chromium 139 (https://source.chromium.org/chromium/chromium/src/+/9092948672e0877e8e08687b65979ad55f392541) with the Rust unzipper.
- The Safari data import still requires access to the file structure so for the time being it will use the in-process C++ unzipper
- Passbook bundle unzipping now uses the Rust unzipper