Flexibles KI Prompt System #48

Merged
Lars merged 56 commits from develop into main 2026-03-26 14:49:48 +01:00
2 changed files with 28 additions and 4 deletions
Showing only changes of commit 7dda520c9b - Show all commits

View File

@ -390,7 +390,31 @@ export default function UnifiedPromptModal({ prompt, onSave, onClose }) {
style={{ width: '100%', textAlign: 'left', resize: 'vertical', fontFamily: 'monospace', fontSize: 12 }}
/>
<div style={{ fontSize: 11, color: 'var(--text3)', marginTop: 4 }}>
Verwende {'{{'} und {'}}'} für Platzhalter (z.B. weight_data, nutrition_data)
<div style={{ marginBottom: 4 }}>
Verwende {'{{'} und {'}}'} für Platzhalter:
</div>
<div style={{ display: 'flex', flexWrap: 'wrap', gap: 4 }}>
{['weight_data', 'nutrition_data', 'activity_data', 'sleep_data', 'vitals_baseline', 'blood_pressure', 'profile_id', 'today'].map(ph => (
<code
key={ph}
onClick={() => {
const placeholder = `{{${ph}}}`
setTemplate(template + placeholder)
}}
style={{
padding: '2px 6px',
background: 'var(--surface2)',
borderRadius: 4,
fontSize: 10,
cursor: 'pointer',
border: '1px solid var(--border)'
}}
title="Klicken zum Einfügen"
>
{'{{'}{ph}{'}}'}
</code>
))}
</div>
</div>
</div>
)}
@ -508,7 +532,7 @@ export default function UnifiedPromptModal({ prompt, onSave, onClose }) {
onChange={e => updateStagePrompt(stage.stage, pIdx, 'template', e.target.value)}
rows={3}
placeholder="Inline-Template mit {{placeholders}}..."
style={{ fontSize: 12, textAlign: 'left', resize: 'vertical', fontFamily: 'monospace' }}
style={{ width: '100%', fontSize: 12, textAlign: 'left', resize: 'vertical', fontFamily: 'monospace' }}
/>
)}
</div>

View File

@ -227,9 +227,9 @@ export default function AdminPromptsPage() {
background: 'var(--surface)',
borderRadius: 12,
border: '1px solid var(--border)',
overflow: 'hidden'
overflowX: 'auto'
}}>
<table style={{ width: '100%', borderCollapse: 'collapse' }}>
<table style={{ width: '100%', minWidth: 900, borderCollapse: 'collapse' }}>
<thead>
<tr style={{
background: 'var(--surface2)',