feat: per-role inject_mode, OTR fixes, hover metadata, send/stop tooltip
- inject_mode: per-role toggle (parallel to inject_datetime) gates the "Current mode: Off The Record" line in the system prompt; wired through model_registry, context_loader, chat router, orchestrator router, and local_llm settings UI - OTR orchestrator fix: OrchestrateRequest now carries off_record; _finalize_job stores it per message and gates log_turn on it; JS orchestrate payload sends off_record correctly - Per-message hover metadata: removed always-visible .model-tag; replaced with .msg-meta strip in the action bar (hover-only); shows model label, host, fallback indicator, and OTR badge; stored in session JSON - Send/stop button tooltip: shows role + model and (when tools on) separate orchestrator model + engine label; live elapsed timer on stop button via startRunTimer/stopRunTimer - OrchestratorResult.backend_label: new field; openai_orchestrator fills it; finalize_job propagates it to job dict and session messages - GET /backend: exposes orchestrator_model label so the frontend tooltip can show both models separately - TODO: session delete confirmation added Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -634,6 +634,9 @@
|
||||
// Inject datetime checkbox (default true if not set)
|
||||
const dtCb = panel.querySelector('.rcp-datetime-cb');
|
||||
if (dtCb) dtCb.checked = cfg.inject_datetime !== false;
|
||||
// Inject mode checkbox (default true if not set)
|
||||
const modeCb = panel.querySelector('.rcp-mode-cb');
|
||||
if (modeCb) modeCb.checked = cfg.inject_mode !== false;
|
||||
// Build tool checklist
|
||||
buildToolChecklist(role, cfg.tools || null);
|
||||
panel.classList.add('open');
|
||||
@@ -674,6 +677,8 @@
|
||||
const ta = panel.querySelector('.rcp-textarea');
|
||||
const dtCb = panel.querySelector('.rcp-datetime-cb');
|
||||
const inject_datetime = dtCb ? dtCb.checked : true;
|
||||
const modeCb = panel.querySelector('.rcp-mode-cb');
|
||||
const inject_mode = modeCb ? modeCb.checked : true;
|
||||
const checks = [...panel.querySelectorAll('.rcp-tools input[type=checkbox]')];
|
||||
const allChecked = checks.every(c => c.checked);
|
||||
const someChecked = checks.some(c => c.checked);
|
||||
@@ -684,7 +689,7 @@
|
||||
const res = await fetch('/api/models/role-config', {
|
||||
method: 'POST',
|
||||
headers: {'Content-Type': 'application/json'},
|
||||
body: JSON.stringify({role, system_append: ta.value, tools, inject_datetime}),
|
||||
body: JSON.stringify({role, system_append: ta.value, tools, inject_datetime, inject_mode}),
|
||||
});
|
||||
const data = await res.json();
|
||||
if (data.ok) {
|
||||
@@ -693,6 +698,7 @@
|
||||
ROLE_CONFIG_DATA[role].system_append = ta.value;
|
||||
ROLE_CONFIG_DATA[role].tools = tools;
|
||||
ROLE_CONFIG_DATA[role].inject_datetime = inject_datetime;
|
||||
ROLE_CONFIG_DATA[role].inject_mode = inject_mode;
|
||||
showToast(`${role} config saved`);
|
||||
closeRolePanel(role);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user