-
Notifications
You must be signed in to change notification settings - Fork 19
feat: Reply with euria #2986
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
Open
solrubado
wants to merge
24
commits into
main
Choose a base branch
from
reply-with-euria
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
feat: Reply with euria #2986
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
a188c82
feat: Add reply Euria button and ask Euria icon on top bar
solrubado 1b15ecd
fix: Remove euria bottom for thread actions
solrubado 9a3fe64
feat: Add reply euria bottomsheet for threadFragment and open ai prop…
solrubado 7a502a4
fix: Restart proposition when navigating to proposition fragment
solrubado 1b676c2
fix: Update and add copyright
solrubado 7679e01
fix: Improve mailbox logic and give last message content as context t…
solrubado 4fcc179
feat: Add new body content payload
Elouan1411 5ee059e
feat: Insert AI suggestion in new message
Elouan1411 a27c5aa
fix: Use REPLY_ALL
Elouan1411 4891678
fix: Remove prompt when reopening bottom sheet
Elouan1411 72c3af5
fix: Make the "Edit my request" button work
Elouan1411 2b6f026
fix: Do not use navigation to send the AI body
Elouan1411 2a4a0c0
fix: Make the "retry" button work
Elouan1411 630063c
feat: Add trailing content
Elouan1411 0798619
feat: Add new feature badge
Elouan1411 d76140a
fix: Add Copilot suggestions
Elouan1411 4ab3fe4
fix: Load and convert message.body using the same plain-text logic be…
Elouan1411 b98af19
fix: Change check to see if aiPrompt is hosted by NewMessageActivity …
solrubado e78ddbb
fix: Display new aiPrompt in loadingPlaceholder when using the "edit …
Elouan1411 98b3fcd
feat: Add ask euria button
Elouan1411 2d6c74e
fix: Replace date formatting to reduce space usage
Elouan1411 215096d
feat: Add matomo
Elouan1411 0cf75c6
refactor: Delete cache once it is no longer useful and remove the pair
Elouan1411 d5f4ae3
fix: Use email if name is not provided to avoid Euria error with empt…
Elouan1411 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
app/src/main/java/com/infomaniak/mail/data/cache/AiDraftCache.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| /* | ||
| * Infomaniak Mail - Android | ||
| * Copyright (C) 2026 Infomaniak Network SA | ||
| * | ||
| * This program is free software: you can redistribute it and/or modify | ||
| * it under the terms of the GNU General Public License as published by | ||
| * the Free Software Foundation, either version 3 of the License, or | ||
| * (at your option) any later version. | ||
| * | ||
| * This program is distributed in the hope that it will be useful, | ||
| * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| * GNU General Public License for more details. | ||
| * | ||
| * You should have received a copy of the GNU General Public License | ||
| * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| */ | ||
| package com.infomaniak.mail.data.cache | ||
|
|
||
| import javax.inject.Inject | ||
| import javax.inject.Singleton | ||
|
|
||
| @Singleton | ||
| class AiDraftCache @Inject constructor() { | ||
| var pendingAiSubject: String? = null | ||
| var pendingAiContent: String? = null | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
60 changes: 60 additions & 0 deletions
60
app/src/main/java/com/infomaniak/mail/ui/main/thread/actions/EuriaPromptBottomSheet.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| /* | ||
| * Infomaniak Mail - Android | ||
| * Copyright (C) 2026 Infomaniak Network SA | ||
| * | ||
| * This program is free software: you can redistribute it and/or modify | ||
| * it under the terms of the GNU General Public License as published by | ||
| * the Free Software Foundation, either version 3 of the License, or | ||
| * (at your option) any later version. | ||
| * | ||
| * This program is distributed in the hope that it will be useful, | ||
| * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| * GNU General Public License for more details. | ||
| * | ||
| * You should have received a copy of the GNU General Public License | ||
| * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| */ | ||
| package com.infomaniak.mail.ui.main.thread.actions | ||
|
|
||
| import android.os.Bundle | ||
| import android.view.LayoutInflater | ||
| import android.view.View | ||
| import android.view.ViewGroup | ||
| import androidx.fragment.app.activityViewModels | ||
| import androidx.navigation.fragment.navArgs | ||
| import com.infomaniak.core.legacy.utils.safeBinding | ||
| import com.infomaniak.core.legacy.utils.setBackNavigationResult | ||
| import com.infomaniak.mail.R | ||
| import com.infomaniak.mail.databinding.ViewAiPromptBinding | ||
| import com.infomaniak.mail.ui.bottomSheetDialogs.EdgeToEdgeBottomSheetDialog | ||
| import com.infomaniak.mail.ui.main.thread.ThreadFragment.Companion.OPEN_AI_REPLY_PROPOSITION | ||
| import com.infomaniak.mail.ui.newMessage.AiViewModel | ||
| import dagger.hilt.android.AndroidEntryPoint | ||
|
|
||
| @AndroidEntryPoint | ||
| class EuriaPromptBottomSheet : EdgeToEdgeBottomSheetDialog() { | ||
|
|
||
| private var binding: ViewAiPromptBinding by safeBinding() | ||
| private val aiViewModel: AiViewModel by activityViewModels() | ||
| private val navigationArgs: EuriaPromptBottomSheetArgs by navArgs() | ||
|
|
||
| override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View { | ||
| return ViewAiPromptBinding.inflate(inflater, container, false).also { binding = it }.root | ||
| } | ||
|
|
||
| override fun onViewCreated(view: View, savedInstanceState: Bundle?) { | ||
| super.onViewCreated(view, savedInstanceState) | ||
|
|
||
| binding.root.bind( | ||
| prompt = aiViewModel.aiPrompt, | ||
| placeholder = getString(R.string.aiPromptAnswer), | ||
| onCloseClick = { dismiss() }, | ||
| onGenerateClick = { | ||
| setBackNavigationResult(OPEN_AI_REPLY_PROPOSITION, navigationArgs.messageUid) | ||
| }, | ||
| onPromptChanged = { aiViewModel.aiPrompt = it }, | ||
| ) | ||
| binding.root.focusPrompt() | ||
| } | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.