import React, { useEffect, useState } from 'react'; import { Code2, FlaskConical, History, Lock, Play, RotateCcw, Sliders, Sparkles, Terminal } from 'lucide-react'; import { api, apiData } from '../services/api'; import { useLlmConfig } from '../services/useLlmConfig'; import ModelGate from './ModelGate'; /** * Developer steering console (Dev tab). Honors the two-layer differentiation: * - Layer 1 DISCOVERED (read-only per persona) — shown locked with a badge. * - Layer 1 WRITE via derivation RULESETS — how parameters are computed * (safe formulas), clearly a developer authoring surface. * - Layer 2 AUTHORED overrides — per test-case value overrides. * - Past-job CORRECTIONS — an audited changelog with undo (not an edit field). */ const OVERRIDABLE = [ 'observing.observation_delay_ms', 'observing.scan_pattern', 'observing.fixation_budget', 'thinking.max_steps', 'thinking.options_considered', 'acting.allowed_actions', 'acting.timeout_s', 'acting.frustration_abort_after_failed_steps', ]; const Section: React.FC<{ title: string; icon: any; badge?: string; badgeTone?: string; children: React.ReactNode }> = ({ title, icon: Icon, badge, badgeTone, children, }) => (
A property of the persona — computed, not editable. `POST /api/steering/derive`.
{discovered && ( <>
{JSON.stringify(discovered, null, 1)}
>
)}
Redefine the compute rule via a safe formula over persona features. `POST /api/steering/rulesets`.
Override a final value for this test case. `POST /api/steering/apply`.
{JSON.stringify(effective[ovPath.split('.')[0]]?.[ovPath.split('.')[1]], null, 1)}
)}
Numbers stay deterministic; the BYOK text model composes the persona-voiced think-restyle & goal. `POST /api/steering/autofill`.
{!llm.textConfigured ? (
{JSON.stringify(autofill.thinking?.think_restyle_instruction, null, 1)}
)}
Inject a corrected value into a completed artifact. Original kept; every edit logged.