* [Polkadot] Add asset hub westend\polkadot networks under flag.
This PR adds 2 additional asset hun networks to network_manager that are
available under the feature flag along with captured tx data.
* [AI Chat] Add HistorySearchTool exposing local history embeddings
Adds a self-executing Tool subclass that wraps
HistoryEmbeddingsService::Search() so the Leo assistant can semantically
search the user's local browsing history. Returns matches as a JSON
TextContentBlock containing title, URL, snippet, and last visit time.
The tool is not yet wired into any provider; that follows in a separate
commit so this change can be reviewed in isolation.
* [AI Chat] Add unit tests for HistorySearchTool
Covers the input validation and JSON serialization paths exercised by
HistorySearchTool. The full Search() flow is intentionally not faked
here -- HistoryEmbeddingsService has a heavyweight constructor and
faking it pulls in too many dependencies for a tool unit test; the
JSON formatter is exposed via internal:: so it can be tested directly.
* [AI Chat] Wire HistorySearchTool into BrowserToolProvider
The tool is created when history embeddings is enabled for the active
profile (via IsHistoryEmbeddingsEnabledForProfile, which checks the
flag and per-profile eligibility) and surfaced through GetTools().
* [AI Chat] Permit anchors for URLs returned by client-side tools
For Leo models, MarkdownRenderer strips any anchor whose href isn't in the
entry's allowedLinks list -- which today is populated only from the
sourcesEvent that web search emits. Client-side tools (e.g. semantic
history search) had no way to surface trusted URLs, so any [text](url) the
assistant wrote referencing tool results was demoted to a <span>.
Add a sidechannel via the existing ToolArtifact: a new artifact type
"trusted_links" carrying a JSON array of HTTPS URL strings. Conversation
entries flatten these into allowedLinks for the whole assistant group, so
URLs returned by a tool call (which lives in a separate assistant entry
from the follow-up response text) permit anchors in the response.
The artifact is not rendered visually -- it's purely a trust-list. No
mojom struct change, no LLM payload pollution, no "Sources" panel.
HistorySearchTool emits the artifact populated from the URLs in its JSON
results.
* [AI Chat] Add browser test for HistorySearchTool dispatch
Verifies the end-to-end path that unit tests can't reach: the mocked
engine emits a semantic_history_search tool_use event, ConversationHandler
dispatches to the real HistorySearchTool, the tool forwards the parsed
arguments to a fake HistoryEmbeddingsSearch, and the JSON-serialized
result flows back into the conversation history.
A second case exercises malformed args: the tool surfaces an error and
the search service is never called.
Uses the existing AIChatConversationUIBrowserTestBase helper.
On tablet the rewards (BAT) icon lives in the brave_toolbar row, a
wrap_content LinearLayout that caches its measured width. When the icon
is hidden from onMeasure (e.g. when Brave Origin disables rewards), the
implicit requestLayout() from setVisibility() is dropped because the
toolbar is already mid-layout, so the row keeps its old width and the
weighted location bar never reclaims the freed space, leaving a gap
until a device rotation forces a fresh layout.
Route all rewards-slot visibility changes through a helper that, on an
actual change on tablet, re-requests layout on the rewards view itself
(so its row re-measures) off the measure pass, and refreshes the cached
tablet toolbar snapshot.
Resolves: https://github.com/brave/brave-browser/issues/56036
Plumbing for BravePlaylistExclusions component. Installer and registrar to follow suite
Expose PlaylistExclusionsAPI as a protocol with a private impl so Swift can mock it, and add BravePlaylistExclusions.sharedInstance instead of exposing a wrapper on BraveCoreMain.
Register the public header directly in ios/BUILD.gn and remove unused playlist deps from ios/app and ios/browser/web.
Signed-off-by: Eli Hini <8249954+EliHini@users.noreply.github.com>
This change adds a helper class `RandomizedMessageHandlerName` that can be used in JavaScriptFeature's to support randomizing message handler names. The randomized message handler is a UUIDv4 which is injected with the script itself via placeholder replacement.
* [Android] New Nala icons: copy, edit, share, microphone
Icon ic_share_white_24dp is png in the upstream, so for now we have to use png format as well.
* PNG optimisation
* clear window.localStorage from swift side when wallet is reset
* Clear WebUI localStorage on wallet reset via hidden WKWebView
* fix gn check
* address review(kyle) feedback
refactor WebUI localStorage clear to use SequenceBound
Replace the static global objc object and GCD dispatch with a WalletWebviewRunner C++ class held via base::SequenceBound, ensuring correct per-profile lifetime and UI thread enforcement via DCHECK_CURRENTLY_ON.
* address review(stephen) feedback
update func name with more clarity
* [AI Chat] Move HandoffButton lower and make it smaller
Brave's URL bar is centered, so it makes the URL unreadable in more cases than upstream. And Brave's AI Chat conversation UI has large buttons for pausing the tasks, which perform the same function.
- Fix https://github.com/brave/brave-browser/issues/51384
Brave Origin builds disable rewards (enable_brave_rewards =
!is_brave_origin_branded), so the rewards_grant_* endpoints are unused
and should not be required in .env.
This adds an additional tokenized method `sendWebKitMessageSynchronously` alongside `sendTokenizedWebKitMessage{WithReply}` that uses `window.prompt` from SafeBuiltins.
This change adds a new WebGPU web-compat content settings type. This would allow showing a brand new "Webgpu" toggle inside the Brave shields > "Block fingerprinting" secondary UI.
This change also connects the current webgpu scrubbing to this new content setting type which was webgl before. This allows the users to turn on/off the fingerprinting protections selectively on WebGPU APIs w/o changing WebGL.
Resolves: https://github.com/brave/brave-browser/issues/55927
* update
This change:
- Fixed a bug related with WebGPU adapter info.
- Updates the existing WebGPU browser tests to setup the WebGPU environment correctly.
- The tests are disabled for win x64 which doesn't have support for WebGPU adapter.
- New tests are added to check we don't scrub if the kEnableWebGPUDeveloperFeatures feature flag was enabled.
Related brave/brave-browser#55677
* [AI Chat] Tab Management Tool - close action
Adds the "close" action to the tab management tool, reimplemented on top
of the refactored handlers. Closing is asynchronous (beforeunload handlers
can delay WebContents destruction), so a self-owned TabsClosedWaiter waits
for the tabs to be destroyed, or a fallback timeout, before reporting the
resulting tab list. Duplicate tab_ids are de-duplicated and indices are
re-queried per close to avoid acting on a stale or destroyed WebContents.
* [AIChat] Tab Management Tool actions
Implements tab organizing actions. Does not implement close action which, due to complexity, will be submitted separately
Resolves brave/brave-browser#55816
This ensures UpdateIcon_BraveImpl is called at the point where the upstream has already updated the
image, rather than at the end of the function where it would be skipped by early returns.
Regressions from #35750
TEST=DownloadToolbarInsecureIconTest.InsecureDownloadIcon