feat: causal graph
This commit is contained in:
@@ -1062,39 +1062,61 @@ function TabLibrary({
|
||||
|
||||
{(() => {
|
||||
const calib = selected.calibration_json || {}
|
||||
const absorption = calib.absorption_days as number | undefined
|
||||
const decay = calib.decay_type as string | undefined
|
||||
const conf = calib.confidence as number | undefined
|
||||
const rationale = calib.theory_rationale as string | undefined
|
||||
const genAt = calib.theory_generated_at as string | undefined
|
||||
const absorption = calib.absorption_days as number | undefined
|
||||
const halfLife = calib.half_life_days as number | undefined
|
||||
const lagDays = calib.lag_days as number | undefined
|
||||
const decay = calib.decay_type as string | undefined
|
||||
const conf = calib.confidence as number | undefined
|
||||
const rationale = calib.theory_rationale as string | undefined
|
||||
const genAt = calib.theory_generated_at as string | undefined
|
||||
return (
|
||||
<div className="space-y-3">
|
||||
{rationale && (
|
||||
<p className="text-xs text-violet-300 italic border-l-2 border-violet-700/60 pl-2">{rationale}</p>
|
||||
)}
|
||||
<div className="grid grid-cols-2 gap-3">
|
||||
<div className="grid grid-cols-3 gap-3">
|
||||
<div>
|
||||
<div className="text-xs text-slate-500 mb-1">Durée absorption (j)</div>
|
||||
<div className="text-xs text-slate-500 mb-1">Lag (j)</div>
|
||||
<input
|
||||
type="number" min={1} max={60} step={1}
|
||||
type="number" min={0} max={30} step={1}
|
||||
value={lagDays ?? ''}
|
||||
placeholder="0"
|
||||
onChange={e => saveTheoryParams({ lag_days: parseInt(e.target.value) || 0 })}
|
||||
className="w-full bg-dark-800 border border-amber-600/40 rounded px-2 py-1 text-xs text-amber-200 text-center"
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<div className="text-xs text-slate-500 mb-1">Demi-vie t½ (j)</div>
|
||||
<input
|
||||
type="number" min={1} max={120} step={1}
|
||||
value={halfLife ?? ''}
|
||||
placeholder="—"
|
||||
onChange={e => saveTheoryParams({ half_life_days: parseInt(e.target.value) || 5 })}
|
||||
className="w-full bg-dark-800 border border-violet-600/40 rounded px-2 py-1 text-xs text-violet-200 text-center"
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<div className="text-xs text-slate-500 mb-1">Absorption (j)</div>
|
||||
<input
|
||||
type="number" min={1} max={180} step={1}
|
||||
value={absorption ?? ''}
|
||||
placeholder="—"
|
||||
onChange={e => saveTheoryParams({ absorption_days: parseInt(e.target.value) || 7 })}
|
||||
className="w-full bg-dark-800 border border-slate-600 rounded px-2 py-1 text-xs text-slate-200 text-center"
|
||||
/>
|
||||
</div>
|
||||
<div>
|
||||
<div className="text-xs text-slate-500 mb-1">Type de décroissance</div>
|
||||
<select
|
||||
value={decay ?? 'exp'}
|
||||
onChange={e => saveTheoryParams({ decay_type: e.target.value })}
|
||||
className="w-full bg-dark-800 border border-slate-600 rounded px-2 py-1 text-xs text-slate-200"
|
||||
>
|
||||
<option value="step">step — tout ou rien</option>
|
||||
<option value="linear">linear — déclin linéaire</option>
|
||||
<option value="exp">exp — déclin exponentiel</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div className="text-xs text-slate-500 mb-1">Type de décroissance</div>
|
||||
<select
|
||||
value={decay ?? 'exp'}
|
||||
onChange={e => saveTheoryParams({ decay_type: e.target.value })}
|
||||
className="w-full bg-dark-800 border border-slate-600 rounded px-2 py-1 text-xs text-slate-200"
|
||||
>
|
||||
<option value="step">step — tout ou rien</option>
|
||||
<option value="linear">linear — déclin linéaire</option>
|
||||
<option value="exp">exp — déclin exponentiel</option>
|
||||
</select>
|
||||
</div>
|
||||
<div className="flex items-center gap-3 text-xs text-slate-500">
|
||||
{conf !== undefined && (
|
||||
|
||||
Reference in New Issue
Block a user