-
Notifications
You must be signed in to change notification settings - Fork 887
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
[AI Chat]: Android history setting #26988
base: master
Are you sure you want to change the base?
Conversation
@@ -15,7 +15,8 @@ namespace ai_chat::prefs { | |||
|
|||
inline constexpr char kLastAcceptedDisclaimer[] = | |||
"brave.ai_chat.last_accepted_disclaimer"; | |||
inline constexpr char kStorageEnabled[] = "brave.ai_chat.storage_enabled"; | |||
inline constexpr char kBraveChatStorageEnabled[] = |
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.
we're already in the ai_chat namespace so do we need to add the prefix again? IF we do, perhaps kBraveChat -> kBraveAIChat...
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.
Yeah, I added it because this isn't in the namespace in android so without this its BravePrefs.STORAGE_ENABLED
I went with kBraveChat
because that's what everything else is using
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.
As discussed, it needs to prompt the user before disabling since disabling deletes all conversations
15a58e4
to
8485bfa
Compare
8485bfa
to
ebdc11a
Compare
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. --> | ||
|
||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" |
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.
We can remove LinearLayout here as it only contains a single view. we can use Textview directly.
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.
Sweet - I was cargo culting brave/android/java/res/layout/brave_leo_reset_dialog.xml
|
||
Preference history = findPreference(PREF_HISTORY); | ||
if (history != null) { | ||
if (history instanceof ChromeSwitchPreference) { |
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.
two if's could be combine in one.
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.
++
ebdc11a
to
00244e8
Compare
@@ -794,6 +794,7 @@ brave_java_resources = [ | |||
"java/res/layout/brave_custom_tabs_toolbar.xml", | |||
"java/res/layout/brave_dialog_preference.xml", | |||
"java/res/layout/brave_exit_confirmation.xml", | |||
"java/res/layout/brave_leo_clear_history_dialog.xml", |
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.
@bridiver would it be okay if we landed this brave_java_resources
addition? I'm not an Android expert, so it'll take me a while to work out the proper way of doing this and I'm going on PTO on Monday
Resolves brave/brave-browser#42847
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:
History
setting