diff --git a/ui/web/src/i18n/locales/en/agents.json b/ui/web/src/i18n/locales/en/agents.json index 43029297..5a8f0c69 100644 --- a/ui/web/src/i18n/locales/en/agents.json +++ b/ui/web/src/i18n/locales/en/agents.json @@ -147,7 +147,8 @@ "contextFile": "Context file", "perUser": "per-user", "emptyFile": "empty", - "estTokens": "Est {{tokens}} tokens" + "estTokens": "Est {{tokens}} tokens", + "insertContact": "Search contact to insert..." }, "fileEditor": { "editWithAi": "Edit with AI", @@ -222,7 +223,9 @@ "loading": "Loading...", "saving": "Saving...", "save": "Save", - "saved": "Saved" + "saved": "Saved", + "searchContacts": "Search contacts to add...", + "noContactsFound": "No contacts found" }, "summoning": { "title": "Summoning Your Agent...", diff --git a/ui/web/src/i18n/locales/vi/agents.json b/ui/web/src/i18n/locales/vi/agents.json index 1048ebdb..247da7b3 100644 --- a/ui/web/src/i18n/locales/vi/agents.json +++ b/ui/web/src/i18n/locales/vi/agents.json @@ -147,7 +147,8 @@ "contextFile": "Tệp ngữ cảnh", "perUser": "theo người dùng", "emptyFile": "trống", - "estTokens": "Ước {{tokens}} token" + "estTokens": "Ước {{tokens}} token", + "insertContact": "Tìm liên hệ để chèn..." }, "fileEditor": { "editWithAi": "Chỉnh sửa với AI", @@ -222,7 +223,9 @@ "loading": "Đang tải...", "saving": "Đang lưu...", "save": "Lưu", - "saved": "Đã lưu" + "saved": "Đã lưu", + "searchContacts": "Tìm liên hệ để thêm...", + "noContactsFound": "Không tìm thấy liên hệ" }, "summoning": { "title": "Đang triệu hồi agent...", diff --git a/ui/web/src/i18n/locales/zh/agents.json b/ui/web/src/i18n/locales/zh/agents.json index 22a520f7..03d7dee5 100644 --- a/ui/web/src/i18n/locales/zh/agents.json +++ b/ui/web/src/i18n/locales/zh/agents.json @@ -147,7 +147,8 @@ "contextFile": "上下文文件", "perUser": "每用户", "emptyFile": "空", - "estTokens": "估计 {{tokens}} token" + "estTokens": "估计 {{tokens}} token", + "insertContact": "搜索联系人以插入..." }, "fileEditor": { "editWithAi": "AI 编辑", @@ -222,7 +223,9 @@ "loading": "加载中...", "saving": "保存中...", "save": "保存", - "saved": "已保存" + "saved": "已保存", + "searchContacts": "搜索联系人添加...", + "noContactsFound": "未找到联系人" }, "summoning": { "title": "正在召唤您的Agent...", diff --git a/ui/web/src/pages/agents/agent-detail/agent-config-tab.tsx b/ui/web/src/pages/agents/agent-detail/agent-config-tab.tsx index 6bc101be..93d3b4d2 100644 --- a/ui/web/src/pages/agents/agent-detail/agent-config-tab.tsx +++ b/ui/web/src/pages/agents/agent-detail/agent-config-tab.tsx @@ -38,7 +38,6 @@ export function AgentConfigTab({ agent, onUpdate }: AgentConfigTabProps) { const [toolsEnabled, setToolsEnabled] = useState(agent.tools_config != null); const [tools, setTools] = useState(agent.tools_config ?? {}); - const [compEnabled, setCompEnabled] = useState(agent.compaction_config != null); const [comp, setComp] = useState(agent.compaction_config ?? {}); const [pruneEnabled, setPruneEnabled] = useState(agent.context_pruning != null); @@ -79,7 +78,7 @@ export function AgentConfigTab({ agent, onUpdate }: AgentConfigTabProps) { const updates: Record = { subagents_config: subEnabled ? sub : null, tools_config: toolsEnabled ? tools : {}, - compaction_config: compEnabled ? comp : null, + compaction_config: comp, context_pruning: pruneEnabled ? prune : null, sandbox_config: sbEnabled ? sb : null, memory_config: memEnabled ? mem : null, @@ -146,9 +145,7 @@ export function AgentConfigTab({ agent, onUpdate }: AgentConfigTabProps) { />
{ setCompEnabled(v); if (!v) setComp({}); }} onChange={setComp} /> void; onChange: (v: CompactionConfig) => void; } -export function CompactionSection({ enabled, value, onToggle, onChange }: CompactionSectionProps) { +export function CompactionSection({ value, onChange }: CompactionSectionProps) { const { t } = useTranslation("agents"); const s = "configSections.compaction"; return ( - +
+
+

{t(`${s}.title`)}

+

{t(`${s}.description`)}

+
+
{t(`${s}.maxHistoryShare`)} @@ -62,6 +60,7 @@ export function CompactionSection({ enabled, value, onToggle, onChange }: Compac /> {t(`${s}.memoryFlush`)}
- +
+
); }