Skip to content

Commit fa8078f

Browse files
committed
feat: add ai hint for smart replys
Signed-off-by: greta <gretadoci@gmail.com>
1 parent 8685425 commit fa8078f

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

src/store/mainStore/actions.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,17 @@ export default function mainStoreActions() {
479479
return handleHttpAuthErrors(async () => {
480480
if (reply) {
481481
const original = await this.fetchMessage(reply.data.databaseId)
482+
if (reply?.smartReply) {
483+
const AiDisclaimerText = t('mail', '(Parts of this reply was generated with AI)')
482484

485+
if (original.hasHtmlBody) {
486+
reply.smartReply = `${reply.smartReply}
487+
<p></p>
488+
<em>${AiDisclaimerText}</em>`
489+
} else {
490+
reply.smartReply = `${reply.smartReply}\n\n<p></p> ${AiDisclaimerText}`
491+
}
492+
}
483493
// Fetch and transform the body into a rich text object
484494
if (original.hasHtmlBody) {
485495
data.isHtml = true

0 commit comments

Comments
 (0)