mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-07 15:52:52 +03:00
🌐 i18n(combos): add internationalization support for agent features section
- replace hardcoded english text with translation keys in combo form modal
- add english and chinese translations for agent features labels and descriptions
- include system message override, tool filter regex, and context cache protection strings
📝 docs(translations): update i18n message files with new agent features entries
- add agentFeaturesTitle, agentFeaturesDescription, agentFeaturesSystemMessageOverride
- add agentFeaturesSystemMessagePlaceholder, agentFeaturesSystemMessageHint
- add agentFeaturesToolFilterRegex, agentFeaturesToolFilterHint
- add agentFeaturesContextCacheProtection, agentFeaturesContextCacheHint
This commit is contained in:
@@ -3388,34 +3388,31 @@ function ComboFormModal({ isOpen, combo, onClose, onSave, activeProviders }) {
|
||||
<span className="material-symbols-outlined text-[14px] text-primary">
|
||||
smart_toy
|
||||
</span>
|
||||
<p className="text-xs font-medium">Agent Features</p>
|
||||
<span className="text-[10px] text-text-muted">
|
||||
— optional, for agent/tool workflows
|
||||
</span>
|
||||
<p className="text-xs font-medium">{t("agentFeaturesTitle")}</p>
|
||||
<span className="text-[10px] text-text-muted">{t("agentFeaturesDescription")}</span>
|
||||
</div>
|
||||
|
||||
{/* System Message Override */}
|
||||
<div>
|
||||
<label className="text-[11px] font-medium text-text-muted block mb-0.5">
|
||||
System Message Override
|
||||
{t("agentFeaturesSystemMessageOverride")}
|
||||
</label>
|
||||
<textarea
|
||||
rows={2}
|
||||
value={agentSystemMessage}
|
||||
onChange={(e) => setAgentSystemMessage(e.target.value)}
|
||||
placeholder="Override the system prompt for all requests routed through this combo…"
|
||||
placeholder={t("agentFeaturesSystemMessagePlaceholder")}
|
||||
className="w-full text-xs py-1.5 px-2 rounded border border-black/10 dark:border-white/10 bg-transparent focus:border-primary focus:outline-none resize-none"
|
||||
/>
|
||||
<p className="text-[10px] text-text-muted mt-0.5">
|
||||
Replaces any system message sent by the client. Leave empty to pass through client
|
||||
system messages.
|
||||
{t("agentFeaturesSystemMessageHint")}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
{/* Tool Filter Regex */}
|
||||
<div>
|
||||
<label className="text-[11px] font-medium text-text-muted block mb-0.5">
|
||||
Tool Filter Regex
|
||||
{t("agentFeaturesToolFilterRegex")}
|
||||
</label>
|
||||
<input
|
||||
type="text"
|
||||
@@ -3425,8 +3422,7 @@ function ComboFormModal({ isOpen, combo, onClose, onSave, activeProviders }) {
|
||||
className="w-full text-xs py-1.5 px-2 rounded border border-black/10 dark:border-white/10 bg-transparent focus:border-primary focus:outline-none font-mono"
|
||||
/>
|
||||
<p className="text-[10px] text-text-muted mt-0.5">
|
||||
Only tools whose name matches this regex are forwarded to the provider. Leave
|
||||
empty to forward all tools.
|
||||
{t("agentFeaturesToolFilterHint")}
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -3434,11 +3430,10 @@ function ComboFormModal({ isOpen, combo, onClose, onSave, activeProviders }) {
|
||||
<div className="flex items-center justify-between gap-2">
|
||||
<div>
|
||||
<label className="text-[11px] font-medium text-text-muted block">
|
||||
Context Cache Protection
|
||||
{t("agentFeaturesContextCacheProtection")}
|
||||
</label>
|
||||
<p className="text-[10px] text-text-muted">
|
||||
Pins the provider/model across turns to preserve cache sessions. Internal tags
|
||||
are stripped before forwarding to the provider.
|
||||
{t("agentFeaturesContextCacheHint")}
|
||||
</p>
|
||||
</div>
|
||||
<input
|
||||
|
||||
@@ -1102,7 +1102,16 @@
|
||||
"reviewAdvanced": "Advanced Settings",
|
||||
"reviewAgentFlags": "Agent Flags",
|
||||
"reviewSequence": "Model Sequence",
|
||||
"reviewNoSteps": "No steps configured"
|
||||
"reviewNoSteps": "No steps configured",
|
||||
"agentFeaturesTitle": "Agent Features",
|
||||
"agentFeaturesDescription": "— optional, for agent/tool workflows",
|
||||
"agentFeaturesSystemMessageOverride": "System Message Override",
|
||||
"agentFeaturesSystemMessagePlaceholder": "Override the system prompt for all requests routed through this combo…",
|
||||
"agentFeaturesSystemMessageHint": "Replaces any system message sent by the client. Leave empty to pass through client system messages.",
|
||||
"agentFeaturesToolFilterRegex": "Tool Filter Regex",
|
||||
"agentFeaturesToolFilterHint": "Only tools whose name matches this regex are forwarded to the provider. Leave empty to forward all tools.",
|
||||
"agentFeaturesContextCacheProtection": "Context Cache Protection",
|
||||
"agentFeaturesContextCacheHint": "Pins the provider/model across turns to preserve cache sessions. Internal tags are stripped before forwarding to the provider."
|
||||
},
|
||||
"costs": {
|
||||
"title": "Costs",
|
||||
|
||||
@@ -1101,7 +1101,16 @@
|
||||
"reviewAdvanced": "高级设置",
|
||||
"reviewAgentFlags": "Agent 标志",
|
||||
"reviewSequence": "模型序列",
|
||||
"reviewNoSteps": "未配置任何步骤"
|
||||
"reviewNoSteps": "未配置任何步骤",
|
||||
"agentFeaturesTitle": "智能代理功能",
|
||||
"agentFeaturesDescription": "— 可选,用于智能体/工具工作流",
|
||||
"agentFeaturesSystemMessageOverride": "系统消息覆盖",
|
||||
"agentFeaturesSystemMessagePlaceholder": "覆盖通过此组合路由的所有请求的系统提示…",
|
||||
"agentFeaturesSystemMessageHint": "替换客户端发送的任何系统消息。留空则透传客户端系统消息。",
|
||||
"agentFeaturesToolFilterRegex": "工具过滤器正则",
|
||||
"agentFeaturesToolFilterHint": "只有名称匹配此正则的工具才会转发给供应商。留空则转发所有工具。",
|
||||
"agentFeaturesContextCacheProtection": "上下文缓存保护",
|
||||
"agentFeaturesContextCacheHint": "跨轮次锁定供应商/模型以保持缓存会话。内部标签在转发给供应商前会被移除。"
|
||||
},
|
||||
"costs": {
|
||||
"title": "成本",
|
||||
|
||||
Reference in New Issue
Block a user