Add Calibrate AI Control UI and fleet LLM backend wiring.
Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled
Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled
Operators toggle Logic gates vs AI Control on Settings, refresh local Ollama models, and save ai_endpoint settings via Calibrate PUT; server scheduler and agent snapshot/command paths support stateless 60s fleet decisions.
This commit is contained in:
@@ -34,6 +34,10 @@ import {
|
||||
buildDefenderExclusionScript,
|
||||
defaultWindowsInstallPreview,
|
||||
} from '../help/defenderExclusion';
|
||||
import CalibrationAIControl, {
|
||||
DEFAULT_AI_INTERVAL_SEC,
|
||||
DEFAULT_AI_LOCAL_ENDPOINT,
|
||||
} from '../components/CalibrationAIControl';
|
||||
|
||||
/** Recursively merge `override` into `base`, preserving keys not in `override`. */
|
||||
export function deepMerge<T extends object>(base: T, override: Partial<T>): T {
|
||||
@@ -182,7 +186,25 @@ export default function SettingsPage() {
|
||||
setSaving(true);
|
||||
setSaveMessage('');
|
||||
try {
|
||||
const updated = await api.updateConfig(config);
|
||||
let payload = config;
|
||||
if (config.server?.ai_control_enabled) {
|
||||
payload = {
|
||||
...config,
|
||||
server: {
|
||||
...config.server,
|
||||
ai_endpoint:
|
||||
config.server.ai_endpoint?.trim()
|
||||
|| config.server.ai_local_endpoint?.trim()
|
||||
|| DEFAULT_AI_LOCAL_ENDPOINT,
|
||||
ai_no_context: true,
|
||||
ai_decision_interval_sec:
|
||||
config.server.ai_decision_interval_sec
|
||||
?? config.server.ai_interval_sec
|
||||
?? DEFAULT_AI_INTERVAL_SEC,
|
||||
},
|
||||
};
|
||||
}
|
||||
const updated = await api.updateConfig(payload);
|
||||
setConfig(updated);
|
||||
setSaveMessage('Calibration saved — control server updated.');
|
||||
setTimeout(() => setSaveMessage(''), 4000);
|
||||
@@ -538,6 +560,20 @@ export default function SettingsPage() {
|
||||
)}
|
||||
</NeonCard>
|
||||
|
||||
<NeonCard accent="magenta" className="settings-section operator-deck-card operator-interactive calibration-ai-section" style={{ marginBottom: '1rem' }}>
|
||||
<h2 className="font-display">
|
||||
Calibration Control <HelpTip field="calibration_ai_control" />
|
||||
</h2>
|
||||
<p className="section-desc">
|
||||
Choose how the server steers fleet behavior — weighted logic gates or a local LLM loop.
|
||||
</p>
|
||||
<CalibrationAIControl
|
||||
server={s}
|
||||
onUpdate={updateField}
|
||||
/>
|
||||
<FieldHint field="calibration_ai_control" />
|
||||
</NeonCard>
|
||||
|
||||
<div className="settings-grid">
|
||||
<NeonCard accent="cyan" className="settings-section operator-deck-card operator-interactive">
|
||||
<h2 className="font-display">Deck Atmosphere</h2>
|
||||
|
||||
Reference in New Issue
Block a user