Universal CSV Importer #70
No files matched your search
@@ -426,14 +426,14 @@ export default function WorkflowEditorPage() {
|
|||||||
<div className="config-section">
|
<div className="config-section">
|
||||||
<label>KI-Prompt auswählen</label>
|
<label>KI-Prompt auswählen</label>
|
||||||
<select
|
<select
|
||||||
value={selectedNode.data.prompt_id ? String(selectedNode.data.prompt_id) : ''}
|
value={selectedNode.data.prompt_slug ? String(selectedNode.data.prompt_slug) : ''}
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
const promptId = e.target.value
|
const promptSlug = e.target.value
|
||||||
console.log('🎯 Prompt selected:', promptId, 'Type:', typeof promptId)
|
console.log('🎯 Prompt selected:', promptSlug, 'Type:', typeof promptSlug)
|
||||||
const selectedPrompt = availablePrompts.find(p => String(p.id) === promptId)
|
const selectedPrompt = availablePrompts.find(p => p.slug === promptSlug)
|
||||||
console.log('📋 Selected prompt object:', selectedPrompt)
|
console.log('📋 Selected prompt object:', selectedPrompt)
|
||||||
handleNodeUpdate(selectedNode.id, {
|
handleNodeUpdate(selectedNode.id, {
|
||||||
prompt_id: promptId || null, // UUID as string, no parseInt!
|
prompt_slug: promptSlug || null,
|
||||||
prompt_name: selectedPrompt?.name || null
|
prompt_name: selectedPrompt?.name || null
|
||||||
})
|
})
|
||||||
}}
|
}}
|
||||||
@@ -448,14 +448,14 @@ export default function WorkflowEditorPage() {
|
|||||||
>
|
>
|
||||||
<option value="">-- Basis-Prompt wählen --</option>
|
<option value="">-- Basis-Prompt wählen --</option>
|
||||||
{availablePrompts.map(prompt => (
|
{availablePrompts.map(prompt => (
|
||||||
<option key={prompt.id} value={String(prompt.id)}>
|
<option key={prompt.id} value={prompt.slug}>
|
||||||
{prompt.name}
|
{prompt.name}
|
||||||
</option>
|
</option>
|
||||||
))}
|
))}
|
||||||
</select>
|
</select>
|
||||||
{selectedNode.data.prompt_id && (
|
{selectedNode.data.prompt_slug && (
|
||||||
<div style={{ marginTop: 8, fontSize: 12, color: 'var(--text3)' }}>
|
<div style={{ marginTop: 8, fontSize: 12, color: 'var(--text3)' }}>
|
||||||
Prompt ID: {selectedNode.data.prompt_id} ({selectedNode.data.prompt_name || 'unbekannt'})
|
Prompt: {selectedNode.data.prompt_slug} ({selectedNode.data.prompt_name || 'unbekannt'})
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ export function serializeToWorkflowGraph(nodes, edges, metadata = {}) {
|
|||||||
|
|
||||||
// Type-spezifische Felder
|
// Type-spezifische Felder
|
||||||
...(node.type === 'analysis' && {
|
...(node.type === 'analysis' && {
|
||||||
prompt_id: node.data.prompt_id || null,
|
prompt_slug: node.data.prompt_slug || null,
|
||||||
prompt_name: node.data.prompt_name || null,
|
prompt_name: node.data.prompt_name || null,
|
||||||
questions: node.data.questions || [],
|
questions: node.data.questions || [],
|
||||||
fallback_strategy: node.data.fallback_strategy || 'conservative_skip'
|
fallback_strategy: node.data.fallback_strategy || 'conservative_skip'
|
||||||
@@ -78,7 +78,7 @@ export function deserializeFromWorkflowGraph(jsonbData) {
|
|||||||
label: node.label,
|
label: node.label,
|
||||||
|
|
||||||
...(node.type === 'analysis' && {
|
...(node.type === 'analysis' && {
|
||||||
prompt_id: node.prompt_id,
|
prompt_slug: node.prompt_slug,
|
||||||
prompt_name: node.prompt_name || null, // Falls vom Backend mitgeliefert
|
prompt_name: node.prompt_name || null, // Falls vom Backend mitgeliefert
|
||||||
questions: node.questions || [],
|
questions: node.questions || [],
|
||||||
fallback_strategy: node.fallback_strategy || 'conservative_skip'
|
fallback_strategy: node.fallback_strategy || 'conservative_skip'
|
||||||
|
|||||||
Reference in new issue
Block a user