-
Notifications
You must be signed in to change notification settings - Fork 885
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
AIChat: new welcome opt-in ux and contextual toggle #20966
Conversation
A Storybook has been deployed to preview UI for the latest push |
A Storybook has been deployed to preview UI for the latest push |
1 similar comment
A Storybook has been deployed to preview UI for the latest push |
644c5db
to
293184a
Compare
A Storybook has been deployed to preview UI for the latest push |
A Storybook has been deployed to preview UI for the latest push |
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.
This has an issue with the new welcome UX: If I uncheck the new toggle on the Welcome screen, the "Summarize" button doesn't disappear. If I click that then I get a state which seems to say it's about the page but it's missing the title (and it isn't about the page):
In fact this is a problem submitting any input in the Welcome UX, not just the "Summarize" built-in entry suggestion.
e3fc70e
to
1536f31
Compare
A Storybook has been deployed to preview UI for the latest push |
1536f31
to
7b5ae3e
Compare
thanks for spotting. you should be able to see the correct behavior now. |
A Storybook has been deployed to preview UI for the latest push |
getPageHandlerInstance().pageHandler.setShouldSendPageContents( | ||
e.detail.checked | ||
) |
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.
This is more of a nit, but one thing concerns me here - we only show this Toggle when the associated page has SiteInfo. When we call setShouldSendPageContents
, which this toggle is calling directly itself, we're clearing the page content and technically SiteInfo should indicate there's no page present, which would hide this very toggle as soon as it's diabled. I think that potential bug is avoided because we only re-fetch SiteInfo in f/e initialiseForTargetTab
. It seems an easy future regression when that state gets updated whenever page association / site info changes.
7b5ae3e
to
2e030e6
Compare
A Storybook has been deployed to preview UI for the latest push |
A Storybook has been deployed to preview UI for the latest push |
1 similar comment
A Storybook has been deployed to preview UI for the latest push |
A Storybook has been deployed to preview UI for the latest push |
This now has commits from the new welcome opt-in PR #20750, so I suppose that means it's blocked on that now? |
39b325d
to
07d8d58
Compare
A Storybook has been deployed to preview UI for the latest push |
A Storybook has been deployed to preview UI for the latest push |
A Storybook has been deployed to preview UI for the latest push |
[puLL-Merge] - brave/brave-core@20966 The patch introduces changes to an AI chat feature, which includes updates to user experience (UX) elements and logic. Key changes included in the patch:
Files affected by the patch are predominantly Typescript (.tsx) components, C++ (.cc and .h) files, and resource definitions (.grdp) that manage strings for localization. Specific updates mentioned in the patch commits include:
The patch seems to be part of a series, as indicated by the "[PATCH 01/13]" in the description, which implies there are other related patches in the sequence. Each affected file is listed along with the details of insertions ( |
A Storybook has been deployed to preview UI for the latest push |
1 similar comment
A Storybook has been deployed to preview UI for the latest push |
- dont send opt-in bool - siteinfo has a new prop - rename pending conversation entries - uses nala dialog - nala dialog width should work - flush welcome guide to bottom - introducing should_show_questions prop - added pending_message_needs_page_content_ - siteInfo is non-optional - added logic to show_suggestion bool - special summarization request
- remove prop in siteInfo - DCHECK to avoid setter should_send_page_contents_ being set multiple times - DCHECK for special summarization request
…iated with content
f51d025
to
48d4bd5
Compare
A Storybook has been deployed to preview UI for the latest push |
Verification
|
step 4 |
step 5 |
step 6 |
step 7 |
---|---|---|---|
Suggested questions and context-indicator changes - brave/brave-browser#33575 - PASSED
Steps:
- installed
1.63.12
- launched Brave
- loaded
brave://settings/leo-assistant
- confirmed
Show suggested prompts in the conversation
preference is removed - loaded
https://www.euronews.com/2023/12/05/two-spanish-intelligence-agents-arrested-for-passing-classified-information-to-the-us
- clicked on
Leo
in the sidebar - clicked on
Summarize this page
- confirmed opt-in roadblock
- clicked
Accept and begin
- waited for the response output
- clicked on
Suggested questions...
- confirmed three (3)
Suggested follow-ups
- clicked on the
...
ellipsis at the top-right of theLeo
panel - confirmed
Suggested questions
is no longer present in the WebUI panel
step 4 |
step 7 |
step 8 |
step 10 |
steps 11+12 |
step 14 |
---|---|---|---|---|---|
New AI Chat opt-in experience - brave/brave-browser#33942 - PASSED
Steps:
- installed
1.63.12
- launched Brave
- loaded
vox.com
- clicked on
Leo
in the sidebar - clicked on
Summarize this page
- clicked on
Accept and begin
- waited
- scrolled to the bottom of the answer text
- confirmed answer was well-formed and complete
- loaded
vox.com
again
Confirmed opt-in prompt disappears after the 1st summary or question answered
Also repeated the above, but using a manually-entered question to trigger it, instead
example | example | example | example | example |
---|---|---|---|---|
* aichat: new opt-in ux * simplify siteInfo * aichat: toggle page context responses from LLM * moved build site info to conversation driver * special summarize button visibility depends on toggle * MakeAPIRequestWithConversationHistoryUpdate accepts a flag * show model intro on all pages * AI Chat: Don't show suggested questions when conversation isn't associated with content * AI Chat: conversation entry should also be pending if content isn't ready yet --------- Co-authored-by: Pete Miller <miller.pete@gmail.com>
…1314) * Merge pull request #21063 from brave/ai-chat-summary-prompt-force-english ai chat: fix summary prompt for pages is being translated * AIChat: new welcome opt-in ux and contextual toggle (#20966) * aichat: new opt-in ux * simplify siteInfo * aichat: toggle page context responses from LLM * moved build site info to conversation driver * special summarize button visibility depends on toggle * MakeAPIRequestWithConversationHistoryUpdate accepts a flag * show model intro on all pages * AI Chat: Don't show suggested questions when conversation isn't associated with content * AI Chat: conversation entry should also be pending if content isn't ready yet --------- Co-authored-by: Pete Miller <miller.pete@gmail.com> --------- Co-authored-by: Pete Miller <miller.pete@gmail.com>
Resolves brave/brave-browser#34099
Resolves brave/brave-browser#33942
This PR introduces a new welcome guide for users who haven't agreed to the policy terms. Once the user has viewed and accepted the policy, the welcome guide will no longer be displayed.
Additionally, adds a toggle near the input area for users to control if the page contents should be attached to the conversation or not.
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 lint
,npm 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: