mirror of
https://github.com/mudler/LocalAI.git
synced 2026-11-05 12:03:27 -05:00
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
This commit is contained in:
11 files changed
+28
-23
No files matched your search
@@ -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$/)
|
||||
|
||||
@@ -1025,7 +1025,7 @@
|
||||
"title": "Wenn er eine Notiz speichern will",
|
||||
"use_mine": {
|
||||
"title": "Meine Einstellung",
|
||||
"body": "Aktuell: {{level}}."
|
||||
"body": "Deine Einstellung ist <b>{{level}}</b>. <settings>Ändere sie unter Einstellungen > Gedächtnis.</settings>"
|
||||
},
|
||||
"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": {
|
||||
|
||||
@@ -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 <b>{{level}}</b>. <settings>Change it in Settings > Memory.</settings>"
|
||||
},
|
||||
"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": {
|
||||
|
||||
@@ -1025,7 +1025,7 @@
|
||||
"title": "Cuando quiere guardar una nota",
|
||||
"use_mine": {
|
||||
"title": "Usar mi ajuste",
|
||||
"body": "Ahora: {{level}}."
|
||||
"body": "Tu ajuste es <b>{{level}}</b>. <settings>Cámbialo en Ajustes > Memoria.</settings>"
|
||||
},
|
||||
"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": {
|
||||
|
||||
@@ -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 <b>{{level}}</b>. <settings>Modifiez-le dans Réglages > Mémoire.</settings>"
|
||||
},
|
||||
"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": {
|
||||
|
||||
@@ -1025,7 +1025,7 @@
|
||||
"title": "Saat ingin menyimpan catatan",
|
||||
"use_mine": {
|
||||
"title": "Pakai pengaturan saya",
|
||||
"body": "Saat ini: {{level}}."
|
||||
"body": "Pengaturan Anda adalah <b>{{level}}</b>. <settings>Ubah di Pengaturan > Memori.</settings>"
|
||||
},
|
||||
"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": {
|
||||
|
||||
@@ -1025,7 +1025,7 @@
|
||||
"title": "Quando vuole salvare una nota",
|
||||
"use_mine": {
|
||||
"title": "Usa la mia impostazione",
|
||||
"body": "Ora: {{level}}."
|
||||
"body": "La tua impostazione è <b>{{level}}</b>. <settings>Cambiala in Impostazioni > Memoria.</settings>"
|
||||
},
|
||||
"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": {
|
||||
|
||||
@@ -1025,7 +1025,7 @@
|
||||
"title": "메모를 저장하려 할 때",
|
||||
"use_mine": {
|
||||
"title": "내 설정 사용",
|
||||
"body": "현재: {{level}}."
|
||||
"body": "내 설정은 <b>{{level}}</b>입니다. <settings>설정 > 메모리에서 바꿀 수 있습니다.</settings>"
|
||||
},
|
||||
"always": {
|
||||
"title": "항상 확인",
|
||||
@@ -1035,7 +1035,7 @@
|
||||
"title": "안 함",
|
||||
"body": "읽기만 하고 저장하지 않습니다."
|
||||
},
|
||||
"hint": "에이전트는 내 설정보다 더 물어볼 수는 있어도 덜 묻지는 않습니다. \"저장하고 알려주기\"는 여기서 제공되지 않습니다. 메시징 채팅에서는 메모가 먼저 그 대화에 들어가고, 페어링된 보낸 사람일 때만 이 에이전트 자기 메모에 닿습니다."
|
||||
"hint": "메시징 채팅에서는 메모가 먼저 그 대화에 들어가고, 페어링된 보낸 사람일 때만 이 에이전트 자기 메모에 닿습니다."
|
||||
}
|
||||
},
|
||||
"providerPicker": {
|
||||
|
||||
@@ -1025,7 +1025,7 @@
|
||||
"title": "Quando quer salvar uma nota",
|
||||
"use_mine": {
|
||||
"title": "Usar minha configuração",
|
||||
"body": "Agora: {{level}}."
|
||||
"body": "Sua configuração é <b>{{level}}</b>. <settings>Altere em Configurações > Memória.</settings>"
|
||||
},
|
||||
"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": {
|
||||
|
||||
@@ -1025,7 +1025,7 @@
|
||||
"title": "当它想保存笔记时",
|
||||
"use_mine": {
|
||||
"title": "使用我的设置",
|
||||
"body": "当前:{{level}}。"
|
||||
"body": "你的设置是 <b>{{level}}</b>。<settings>可在 设置 > 记忆 中更改。</settings>"
|
||||
},
|
||||
"always": {
|
||||
"title": "始终确认",
|
||||
@@ -1035,7 +1035,7 @@
|
||||
"title": "从不",
|
||||
"body": "只读取,从不保存。"
|
||||
},
|
||||
"hint": "智能体可以比你的设置问得更多,但不会更少。这里不提供“保存并告知我”。在消息聊天中,笔记先存入该对话,只有已配对的发送者才能写入这个智能体自己的笔记。"
|
||||
"hint": "在消息聊天中,笔记先存入该对话,只有已配对的发送者才能写入这个智能体自己的笔记。"
|
||||
}
|
||||
},
|
||||
"providerPicker": {
|
||||
|
||||
@@ -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
|
||||
<input type="radio" name="agent-memory-rule" value={key} checked={checked} onChange={() => onSaveRule(r)} />
|
||||
<span className="am__text">
|
||||
<span className="am__title">{t(`agentMemory.rule.${key}.title`)}</span>
|
||||
<span className="am__body">{r ? t(`agentMemory.rule.${key}.body`) : t('agentMemory.rule.use_mine.body', { level: t(`memorySettings.save.${userLevel || 'ask'}.title`) })}</span>
|
||||
<span className="am__body">{r ? t(`agentMemory.rule.${key}.body`) : (
|
||||
<Trans t={t} i18nKey="agentMemory.rule.use_mine.body" values={{ level: t(`memorySettings.save.${userLevel || 'ask'}.title`) }}
|
||||
components={{ b: <b data-testid="agent-memory-user-level" />, settings: <Link className="cs-link" to="/app/account?tab=memory" data-testid="agent-memory-settings-link" /> }} />
|
||||
)}</span>
|
||||
</span>
|
||||
</label>
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user