-
Notifications
You must be signed in to change notification settings - Fork 893
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
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.
That's a shame they were kBraveChat
instead of at least kBraveAIChat
🤷 and also it's strange that if anything is used on android then we need to make a globally-unique name, but that's something to sort out another time.
Actually I think we should at least keep this as kBraveAIChatStorageEnabled
and then we'll get to renaming the rest. I don't want to introduce more inconsistent Chat references as it sounds like a different feature.
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
android/java/org/chromium/chrome/browser/settings/BraveLeoPreferences.java
Outdated
Show resolved
Hide resolved
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
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 fine for now
00244e8
to
a29fae9
Compare
@@ -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.
That's a shame they were kBraveChat
instead of at least kBraveAIChat
🤷 and also it's strange that if anything is used on android then we need to make a globally-unique name, but that's something to sort out another time.
Actually I think we should at least keep this as kBraveAIChatStorageEnabled
and then we'll get to renaming the rest. I don't want to introduce more inconsistent Chat references as it sounds like a different feature.
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.
LGTM
Released in v1.75.110 |
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