Skip to content

Commit 9cbfde9

Browse files
raifdmuellerclaude
andcommitted
feat: add agentic presets and preset-level reset (Phase 3)
Adds three new presets demonstrating the LLM Runtime Modifier: - Support Chatbot / Chatbot → L2 (generative output) - RAG Knowledge Assistant / RAG-Wissensassistent → L3 (tool use) - Coding Agent / Coding-Agent → L4 (agentic) Clicking any preset now sets llmRuntimeLevel explicitly (defaulting to 0 for legacy presets via `?? 0`), so switching between classical and LLM-integrated presets resets the modifier correctly. The active state also compares levels to prevent false-positive highlights. Refs #20 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent e33ab30 commit 9cbfde9

2 files changed

Lines changed: 36 additions & 2 deletions

File tree

src/components/RiskRadar.jsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,11 +147,15 @@ export default function RiskRadar() {
147147
{/* Presets */}
148148
<div className={styles.presets}>
149149
{t.presets.map((p) => {
150-
const active = JSON.stringify(roundedValues) === JSON.stringify(p.values);
150+
const presetLevel = p.llmRuntimeLevel ?? 0;
151+
const active = JSON.stringify(roundedValues) === JSON.stringify(p.values) && llmRuntimeLevel === presetLevel;
151152
return (
152153
<button
153154
key={p.name}
154-
onClick={() => animateTo(p.values)}
155+
onClick={() => {
156+
setLlmRuntimeLevel(presetLevel);
157+
animateTo(p.values);
158+
}}
155159
className={styles.presetBtn}
156160
style={{
157161
border: active ? `2px solid ${tc}` : "1px solid var(--border)",

src/i18n.js

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,21 @@ const T = {
121121
{ name: "Payment Service", values: { codeType: 4, language: 1, deployment: 2, data: 4, blastRadius: 3 } },
122122
{ name: "Auth-Modul (Fintech)", values: { codeType: 4, language: 2, deployment: 2, data: 3, blastRadius: 3 } },
123123
{ name: "Medizingerät-Firmware", values: { codeType: 4, language: 4, deployment: 4, data: 4, blastRadius: 4 } },
124+
{
125+
name: "Support-Chatbot",
126+
values: { codeType: 2, language: 2, deployment: 2, data: 2, blastRadius: 1 },
127+
llmRuntimeLevel: 2,
128+
},
129+
{
130+
name: "RAG-Wissensassistent",
131+
values: { codeType: 2, language: 2, deployment: 2, data: 2, blastRadius: 2 },
132+
llmRuntimeLevel: 3,
133+
},
134+
{
135+
name: "Coding-Agent",
136+
values: { codeType: 3, language: 2, deployment: 2, data: 1, blastRadius: 3 },
137+
llmRuntimeLevel: 4,
138+
},
124139
],
125140
mitigations: [
126141
{
@@ -507,6 +522,21 @@ Quellcode der Skills: https://github.com/LLM-Coding/vibe-coding-risk-radar/tree/
507522
{ name: "Payment Service", values: { codeType: 4, language: 1, deployment: 2, data: 4, blastRadius: 3 } },
508523
{ name: "Auth Module (Fintech)", values: { codeType: 4, language: 2, deployment: 2, data: 3, blastRadius: 3 } },
509524
{ name: "Medical Device FW", values: { codeType: 4, language: 4, deployment: 4, data: 4, blastRadius: 4 } },
525+
{
526+
name: "Support Chatbot",
527+
values: { codeType: 2, language: 2, deployment: 2, data: 2, blastRadius: 1 },
528+
llmRuntimeLevel: 2,
529+
},
530+
{
531+
name: "RAG Knowledge Assistant",
532+
values: { codeType: 2, language: 2, deployment: 2, data: 2, blastRadius: 2 },
533+
llmRuntimeLevel: 3,
534+
},
535+
{
536+
name: "Coding Agent",
537+
values: { codeType: 3, language: 2, deployment: 2, data: 1, blastRadius: 3 },
538+
llmRuntimeLevel: 4,
539+
},
510540
],
511541
mitigations: [
512542
{

0 commit comments

Comments
 (0)