15 Commits
Author SHA1 Message Date
Christian Mazakas 7674adc5e8 [Polkadot] [Wallet] add asset_tx_payment field to chain metadata (#36218)
Update chain metadata parsing to handle probing for extrinsic extensions, which
tells us if we need to supply an asset_id during the extrinsic signing process.

Note, adding extra/new fields to the Polkadot chain metadata doesn't require
manual migrations. If new fields are added then the initial parse from the Prefs
will fail which causes the metadata to be re-fetched which will then build the
new metadata properly and cache it, so there should be no issues in this regard.

In Polkadot, extrinsics may require specific signing extensions. This code
updates the metadata parsing routines to parse this data from the metadata blobs
we get from the remote and then persist the new field to the prefs.
2026-05-08 12:12:03 -07:00
vadims 3482487138 [PSST] Add consent dialog back-end (#35931)
* consent dialog backend

Signed-off-by: Vadym Struts <vstruts@brave.com>

* fix browser test

Signed-off-by: Vadym Struts <vstruts@brave.com>

* fix browser test

Signed-off-by: Vadym Struts <vstruts@brave.com>

* fix unit test

Signed-off-by: Vadym Struts <vstruts@brave.com>

* fix dependency

Signed-off-by: Vadym Struts <vstruts@brave.com>

* review

Signed-off-by: Vadym Struts <vstruts@brave.com>

* review

Signed-off-by: Vadym Struts <vstruts@brave.com>

* review

Signed-off-by: Vadym Struts <vstruts@brave.com>

* fix build

Signed-off-by: Vadym Struts <vstruts@brave.com>

* review

Signed-off-by: Vadym Struts <vstruts@brave.com>

* review

Signed-off-by: Vadym Struts <vstruts@brave.com>

* review

Signed-off-by: Vadym Struts <vstruts@brave.com>

---------

Signed-off-by: Vadym Struts <vstruts@brave.com>
2026-04-28 12:26:54 -04:00
cypt4 2881f0aca3 [Polkadot] Add polkadot metadata parsing step. (#34784)
* [Polkadot] Add polkadot metadata parsing step.
Parse polkadot SCALE encoded metadata response.
2026-04-09 17:57:03 +04:00
Anthony Tseng 0b24029cf6 Add PDF text extraction at upload time for Leo (#34800)
* Add extracted_text field to UploadedFile mojom

Add an optional extracted_text string field to the UploadedFile mojom
struct for holding PDF text extracted at upload time via the PDF
rendering pipeline and ScreenAI OCR.

Update all UploadedFile::New() call sites to pass std::nullopt and
all TS UploadedFile object literals to include extractedText. Add
database migration v9->v10 for the encrypted extracted_text column,
update INSERT/SELECT queries, and add v9 SQL dump for migration tests.

* Integrate PdfTextExtractor into upload pipeline

Wire PdfTextExtractor into AIChatUIHandler via a new ProcessPdfFile
mojo endpoint for WebUI drag-and-drop PDF uploads.

- Add ProcessPdfFile to AIChatUIHandler mojom interface
- Implement on desktop (creates PdfTextExtractor, returns UploadedFile
  with extracted_text) and iOS (no-op, returns raw data only)
- Update UploadFileHelper UploadedFile::New call sites for new field
- Update TypeScript: file_utils.ts, input_box, drag_overlay to call
  processPdfFile for PDF files with fallback to raw data
- Update API layer and mock interfaces with processPdfFile endpoint

* Send extracted PDF text in engine layer, prefer over raw bytes

When a PDF has extracted_text, send it as a TextContentBlock prefixed
with "[PDF: filename]" instead of the raw FileContentBlock. Only fall
back to raw bytes when no text was extracted. This ensures local LLMs
that cannot process raw PDF bytes still get usable content.
2026-04-04 09:55:54 +02:00
vadims 7b79a531f5 [PSST] Added the infobar (#34809)
The infobar is displayed when the PSST feature is available for the 
website. Accepting the infobar allows the flow to proceed and the policy
script to run, otherwise, declining it interrupts the flow.

Resolves: https://github.com/brave/brave-browser/issues/53706

---------

Signed-off-by: Vadym Struts <vstruts@brave.com>
2026-03-25 11:42:45 +01:00
Mikhail cdd75b9808 Fix eslint import issues (#34211)
The PR fixes some eslint import/* issues
2026-03-05 14:42:29 +07:00
Darnell Andries ffdc8d2368 [AIChat] Persist NEAR verification status in database (#32334)
* [AIChat] Add id to completion event and NEAR verification status to conversation entry

* Remove id from completion event

* Wrap NEAR verification status in struct as workaround for iOS

* Update iOS AIChatResponseMessageView

* [AIChat] Persist NEAR verification status in database

* Remove `UpdateEntryVerificationStatus`

* Update to use `near_verification_status`
2025-11-18 13:54:29 -08:00
Brian Johnson c341c734e9 Run components/brave_wallet/browser tests on ios (#32230)
Tests that failed for non-obvious reasons are set for follow-up https://github.com/brave/brave-browser/issues/50734
2025-11-10 08:44:03 -07:00
Jocelyn Liu 0dc6c27d15 [Leo] Smart Modes - backend changes (#31422)
* Implement backend support of smart modes

- Add a dict preference for smart modes and methods to access/edit the
  pref
- Add SubmitHumanConversationEntryWithMode API to create and submit
  ConversationTurn with smart mode entry
- When smart mode entry presents, EngineConsumerOAI/ConversationAPI will
  create a content block or a message to let agents to interpret the shortcut as the mapped
  prompt right before the user message
- Expose CRUD APIs and observe method for smart modes to UI
- Persist smart mode entry data in conversation entries
- Unit tests
2025-09-26 14:25:09 -07:00
vadims d7e7162fdd [PSST] Add parameter passing for policy script (#30716)
Parameters allows us to pass to the policy script the list of tasks
and user identifier, retrieved with help of user script.

Resolves: https://github.com/brave/brave-browser/issues/48520

---------

Signed-off-by: Vadym Struts <vstruts@brave.com>
2025-08-27 12:58:11 +02:00
Jay Harris 2c62a2969e [AI Chat]: Associate content with a specific turn (#30487)
Before this PR, all content was associated with a Conversation and sent to the server at the beginning of a conversation. This PR changes that to associated content with a specific ConversationTurn and sends the content just before the turn it is associated with.
2025-08-21 12:10:55 +12:00
Anton Paymyshev 155a209f61 Cardano message signing (#30030) 2025-07-24 15:56:39 +07:00
vadims c1933020e0 Refactoring of the PSST feature
It is first stage of the PSST feature implementation. The main goal
was to make the existing code ready to the next implementation
steps and be consistent with feature requirements.

Resolves: https://github.com/brave/brave-browser/issues/46045

---------

Signed-off-by: Vadym Struts <vstruts@brave.com>
2025-07-23 21:45:51 +02:00
Anton Paymyshev 0d6991ce5b Move wallet tests to brave_components_unittests (#29971)
Move wallet tests to brave_components_unittets
2025-07-11 21:10:58 +07:00
Anthony Tseng 47b9bbd7ad Create component unit tests (#29739)
Create brave_components_unittests so components tests don't run as part of ChromeTestSuite
2025-07-01 15:21:58 -07:00