From b574d1c6620094c10f6ee41b06fcc93aec67b19d Mon Sep 17 00:00:00 2001 From: Ettore Di Giacinto Date: Thu, 5 Nov 2026 11:53:42 +0000 Subject: [PATCH] feat(ui): show the account save level in the agent Memory section Under "Use my setting" the agent form now says which level the account has, for example "Your setting is Ask me first.", and links to Settings > Memory where it can be changed. The line saying an agent can never be looser than the account is removed from the hint. Assisted-by: Claude:claude-sonnet-5-5 --- core/http/react-ui/e2e/agent-memory.spec.js | 8 +++++--- core/http/react-ui/public/locales/de/chats.json | 4 ++-- core/http/react-ui/public/locales/en/chats.json | 4 ++-- core/http/react-ui/public/locales/es/chats.json | 4 ++-- core/http/react-ui/public/locales/fr/chats.json | 4 ++-- core/http/react-ui/public/locales/id/chats.json | 4 ++-- core/http/react-ui/public/locales/it/chats.json | 4 ++-- core/http/react-ui/public/locales/ko/chats.json | 4 ++-- core/http/react-ui/public/locales/pt-BR/chats.json | 4 ++-- core/http/react-ui/public/locales/zh-CN/chats.json | 4 ++-- .../react-ui/src/components/agents/AgentMemoryChoice.jsx | 7 +++++-- 11 files changed, 28 insertions(+), 23 deletions(-) diff --git a/core/http/react-ui/e2e/agent-memory.spec.js b/core/http/react-ui/e2e/agent-memory.spec.js index 261d0cf07..4169d53bc 100644 --- a/core/http/react-ui/e2e/agent-memory.spec.js +++ b/core/http/react-ui/e2e/agent-memory.spec.js @@ -115,10 +115,12 @@ test.describe('The save rule of the agent', () => { const rule = page.getByTestId('agent-memory-rule') await expect(rule.getByRole('radio')).toHaveCount(3) await expect(rule.locator('.am__title')).toHaveText(['Use my setting', 'Always confirm', 'Never']) - await expect(rule).toContainText('Currently: Save it and tell me.') + await expect(page.getByTestId('agent-memory-rule-use_mine')).toContainText('Your setting is Save it and tell me. Change it in Settings > Memory.') + await expect(page.getByTestId('agent-memory-user-level')).toHaveText('Save it and tell me') + await expect(page.getByTestId('agent-memory-settings-link')).toHaveAttribute('href', '/app/account?tab=memory') await expect(page.getByTestId('agent-memory-rule-use_mine').locator('input')).toBeChecked() - await expect(rule.getByText('Save it and tell me', { exact: true })).toHaveCount(0) - await expect(page.getByTestId('agent-memory-rule-hint')).toContainText('never less') + await expect(rule.locator('.am__title').getByText('Save it and tell me', { exact: true })).toHaveCount(0) + await expect(page.getByTestId('agent-memory-rule-hint')).toContainText('paired sender') await shot(page, 'agent-memory-rule', { fullPage: true }) await page.getByRole('button', { name: 'Save changes' }).first().click() await expect(page).toHaveURL(/\/app\/agents$/) diff --git a/core/http/react-ui/public/locales/de/chats.json b/core/http/react-ui/public/locales/de/chats.json index e74438ba6..f4d52c78a 100644 --- a/core/http/react-ui/public/locales/de/chats.json +++ b/core/http/react-ui/public/locales/de/chats.json @@ -1025,7 +1025,7 @@ "title": "Wenn er eine Notiz speichern will", "use_mine": { "title": "Meine Einstellung", - "body": "Aktuell: {{level}}." + "body": "Deine Einstellung ist {{level}}. Ändere sie unter Einstellungen > Gedächtnis." }, "always": { "title": "Immer bestätigen", @@ -1035,7 +1035,7 @@ "title": "Nie", "body": "Liest, speichert nie." }, - "hint": "Ein Agent darf mehr fragen als deine Einstellung, aber nie weniger. „Speichern und Bescheid geben“ gibt es hier nicht. In einem Messaging-Chat geht eine Notiz zuerst in diese Unterhaltung und erreicht die eigenen Notizen dieses Agenten nur von einem gekoppelten Absender." + "hint": "In einem Messaging-Chat geht eine Notiz zuerst in diese Unterhaltung und erreicht die eigenen Notizen dieses Agenten nur von einem gekoppelten Absender." } }, "providerPicker": { diff --git a/core/http/react-ui/public/locales/en/chats.json b/core/http/react-ui/public/locales/en/chats.json index bec570779..07cea9301 100644 --- a/core/http/react-ui/public/locales/en/chats.json +++ b/core/http/react-ui/public/locales/en/chats.json @@ -1347,7 +1347,7 @@ "title": "When it wants to save a note", "use_mine": { "title": "Use my setting", - "body": "Currently: {{level}}." + "body": "Your setting is {{level}}. Change it in Settings > Memory." }, "always": { "title": "Always confirm", @@ -1357,7 +1357,7 @@ "title": "Never", "body": "It reads, never saves." }, - "hint": "An agent can ask more than your setting, never less. \"Save it and tell me\" is not offered here. In a messaging chat a note goes to that conversation first, and reaches this agent's own notes only from a paired sender." + "hint": "In a messaging chat a note goes to that conversation first, and reaches this agent's own notes only from a paired sender." } }, "providerPicker": { diff --git a/core/http/react-ui/public/locales/es/chats.json b/core/http/react-ui/public/locales/es/chats.json index 6c7c969f1..2d16c9865 100644 --- a/core/http/react-ui/public/locales/es/chats.json +++ b/core/http/react-ui/public/locales/es/chats.json @@ -1025,7 +1025,7 @@ "title": "Cuando quiere guardar una nota", "use_mine": { "title": "Usar mi ajuste", - "body": "Ahora: {{level}}." + "body": "Tu ajuste es {{level}}. Cámbialo en Ajustes > Memoria." }, "always": { "title": "Confirmar siempre", @@ -1035,7 +1035,7 @@ "title": "Nunca", "body": "Lee, nunca guarda." }, - "hint": "Un agente puede preguntar más que tu ajuste, nunca menos. «Guardar y avisarme» no se ofrece aquí. En un chat de mensajería la nota va primero a esa conversación y llega a las notas propias de este agente solo desde un remitente emparejado." + "hint": "En un chat de mensajería la nota va primero a esa conversación y llega a las notas propias de este agente solo desde un remitente emparejado." } }, "providerPicker": { diff --git a/core/http/react-ui/public/locales/fr/chats.json b/core/http/react-ui/public/locales/fr/chats.json index 89f854e2c..63d439c96 100644 --- a/core/http/react-ui/public/locales/fr/chats.json +++ b/core/http/react-ui/public/locales/fr/chats.json @@ -1025,7 +1025,7 @@ "title": "Quand il veut enregistrer une note", "use_mine": { "title": "Utiliser mon réglage", - "body": "Actuellement : {{level}}." + "body": "Votre réglage est {{level}}. Modifiez-le dans Réglages > Mémoire." }, "always": { "title": "Toujours confirmer", @@ -1035,7 +1035,7 @@ "title": "Jamais", "body": "Il lit, n'enregistre jamais." }, - "hint": "Un agent peut demander plus que votre réglage, jamais moins. « Enregistrer et me prévenir » n'est pas proposé ici. Dans une conversation de messagerie, la note va d'abord à cette conversation et n'atteint les notes propres de cet agent que depuis un expéditeur associé." + "hint": "Dans une conversation de messagerie, la note va d'abord à cette conversation et n'atteint les notes propres de cet agent que depuis un expéditeur associé." } }, "providerPicker": { diff --git a/core/http/react-ui/public/locales/id/chats.json b/core/http/react-ui/public/locales/id/chats.json index c02fa3a4f..5a8a946b8 100644 --- a/core/http/react-ui/public/locales/id/chats.json +++ b/core/http/react-ui/public/locales/id/chats.json @@ -1025,7 +1025,7 @@ "title": "Saat ingin menyimpan catatan", "use_mine": { "title": "Pakai pengaturan saya", - "body": "Saat ini: {{level}}." + "body": "Pengaturan Anda adalah {{level}}. Ubah di Pengaturan > Memori." }, "always": { "title": "Selalu konfirmasi", @@ -1035,7 +1035,7 @@ "title": "Jangan pernah", "body": "Membaca, tidak pernah menyimpan." }, - "hint": "Agen boleh bertanya lebih banyak dari pengaturan Anda, tidak pernah lebih sedikit. \"Simpan dan beri tahu saya\" tidak ditawarkan di sini. Di obrolan aplikasi pesan, catatan masuk ke percakapan itu dulu, dan sampai ke catatan milik agen ini hanya dari pengirim yang dipasangkan." + "hint": "Di obrolan aplikasi pesan, catatan masuk ke percakapan itu dulu, dan sampai ke catatan milik agen ini hanya dari pengirim yang dipasangkan." } }, "providerPicker": { diff --git a/core/http/react-ui/public/locales/it/chats.json b/core/http/react-ui/public/locales/it/chats.json index dbc40226d..9a1b56cfd 100644 --- a/core/http/react-ui/public/locales/it/chats.json +++ b/core/http/react-ui/public/locales/it/chats.json @@ -1025,7 +1025,7 @@ "title": "Quando vuole salvare una nota", "use_mine": { "title": "Usa la mia impostazione", - "body": "Ora: {{level}}." + "body": "La tua impostazione è {{level}}. Cambiala in Impostazioni > Memoria." }, "always": { "title": "Conferma sempre", @@ -1035,7 +1035,7 @@ "title": "Mai", "body": "Legge, non salva mai." }, - "hint": "Un agente può chiedere di più della tua impostazione, mai di meno. «Salva e avvisami» qui non è offerto. In una chat di messaggistica la nota va prima in quella conversazione e arriva alle note proprie di questo agente solo da un mittente abbinato." + "hint": "In una chat di messaggistica la nota va prima in quella conversazione e arriva alle note proprie di questo agente solo da un mittente abbinato." } }, "providerPicker": { diff --git a/core/http/react-ui/public/locales/ko/chats.json b/core/http/react-ui/public/locales/ko/chats.json index 711da8a7f..88f203650 100644 --- a/core/http/react-ui/public/locales/ko/chats.json +++ b/core/http/react-ui/public/locales/ko/chats.json @@ -1025,7 +1025,7 @@ "title": "메모를 저장하려 할 때", "use_mine": { "title": "내 설정 사용", - "body": "현재: {{level}}." + "body": "내 설정은 {{level}}입니다. 설정 > 메모리에서 바꿀 수 있습니다." }, "always": { "title": "항상 확인", @@ -1035,7 +1035,7 @@ "title": "안 함", "body": "읽기만 하고 저장하지 않습니다." }, - "hint": "에이전트는 내 설정보다 더 물어볼 수는 있어도 덜 묻지는 않습니다. \"저장하고 알려주기\"는 여기서 제공되지 않습니다. 메시징 채팅에서는 메모가 먼저 그 대화에 들어가고, 페어링된 보낸 사람일 때만 이 에이전트 자기 메모에 닿습니다." + "hint": "메시징 채팅에서는 메모가 먼저 그 대화에 들어가고, 페어링된 보낸 사람일 때만 이 에이전트 자기 메모에 닿습니다." } }, "providerPicker": { diff --git a/core/http/react-ui/public/locales/pt-BR/chats.json b/core/http/react-ui/public/locales/pt-BR/chats.json index d3ea3c1c2..c272c57bf 100644 --- a/core/http/react-ui/public/locales/pt-BR/chats.json +++ b/core/http/react-ui/public/locales/pt-BR/chats.json @@ -1025,7 +1025,7 @@ "title": "Quando quer salvar uma nota", "use_mine": { "title": "Usar minha configuração", - "body": "Agora: {{level}}." + "body": "Sua configuração é {{level}}. Altere em Configurações > Memória." }, "always": { "title": "Sempre confirmar", @@ -1035,7 +1035,7 @@ "title": "Nunca", "body": "Lê, nunca salva." }, - "hint": "Um agente pode perguntar mais que a sua configuração, nunca menos. \"Salvar e me avisar\" não é oferecido aqui. Em um chat de mensagens, a nota vai primeiro para essa conversa e só chega às notas próprias deste agente vinda de um remetente pareado." + "hint": "Em um chat de mensagens, a nota vai primeiro para essa conversa e só chega às notas próprias deste agente vinda de um remetente pareado." } }, "providerPicker": { diff --git a/core/http/react-ui/public/locales/zh-CN/chats.json b/core/http/react-ui/public/locales/zh-CN/chats.json index f0221a812..2931132f2 100644 --- a/core/http/react-ui/public/locales/zh-CN/chats.json +++ b/core/http/react-ui/public/locales/zh-CN/chats.json @@ -1025,7 +1025,7 @@ "title": "当它想保存笔记时", "use_mine": { "title": "使用我的设置", - "body": "当前:{{level}}。" + "body": "你的设置是 {{level}}。可在 设置 > 记忆 中更改。" }, "always": { "title": "始终确认", @@ -1035,7 +1035,7 @@ "title": "从不", "body": "只读取,从不保存。" }, - "hint": "智能体可以比你的设置问得更多,但不会更少。这里不提供“保存并告知我”。在消息聊天中,笔记先存入该对话,只有已配对的发送者才能写入这个智能体自己的笔记。" + "hint": "在消息聊天中,笔记先存入该对话,只有已配对的发送者才能写入这个智能体自己的笔记。" } }, "providerPicker": { diff --git a/core/http/react-ui/src/components/agents/AgentMemoryChoice.jsx b/core/http/react-ui/src/components/agents/AgentMemoryChoice.jsx index 867ee3d9a..51576f0d2 100644 --- a/core/http/react-ui/src/components/agents/AgentMemoryChoice.jsx +++ b/core/http/react-ui/src/components/agents/AgentMemoryChoice.jsx @@ -1,6 +1,6 @@ /* eslint-disable no-unused-vars -- components used only inside JSX look unused to this config, which has no eslint-plugin-react */ import { useId } from 'react' -import { useTranslation } from 'react-i18next' +import { Trans, useTranslation } from 'react-i18next' import { Link } from 'react-router-dom' import Icon from '../Icon' import { Callout } from '../ui' @@ -76,7 +76,10 @@ export default function AgentMemoryChoice({ value, onChange, saves, onSaves, use onSaveRule(r)} /> {t(`agentMemory.rule.${key}.title`)} - {r ? t(`agentMemory.rule.${key}.body`) : t('agentMemory.rule.use_mine.body', { level: t(`memorySettings.save.${userLevel || 'ask'}.title`) })} + {r ? t(`agentMemory.rule.${key}.body`) : ( + , settings: }} /> + )} )