Universal CSV Importer #70

Merged
Lars merged 54 commits from develop into main 2026-04-11 07:06:47 +02:00
3 changed files with 4 additions and 4 deletions
Showing only changes of commit 2994df54ad - Show all commits

View File

@ -5,14 +5,14 @@ import { Handle, Position } from 'reactflow'
* *
* Properties: * Properties:
* - data.label: Node-Label * - data.label: Node-Label
* - data.prompt_id: ID des referenzierten Basis-Prompts * - data.prompt_slug: Slug des referenzierten Basis-Prompts
* - data.prompt_name: Name des Prompts (optional, für Display) * - data.prompt_name: Name des Prompts (optional, für Display)
* - data.questions: Array von Question Augmentations * - data.questions: Array von Question Augmentations
* - selected: Boolean * - selected: Boolean
*/ */
export function AnalysisNode({ data, selected }) { export function AnalysisNode({ data, selected }) {
const hasQuestions = data.questions?.length > 0 const hasQuestions = data.questions?.length > 0
const promptName = data.prompt_name || (data.prompt_id ? `Prompt #${data.prompt_id}` : 'Kein Prompt') const promptName = data.prompt_name || (data.prompt_slug ? `Prompt: ${data.prompt_slug}` : 'Kein Prompt')
const questionCount = data.questions?.length || 0 const questionCount = data.questions?.length || 0
return ( return (

View File

@ -78,7 +78,7 @@ export function deserializeFromWorkflowGraph(jsonbData) {
label: node.label, label: node.label,
...(node.type === 'analysis' && { ...(node.type === 'analysis' && {
prompt_slug: node.prompt_slug, prompt_slug: node.prompt_slug || node.prompt_id || null, // Fallback für alte Workflows mit prompt_id
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'

View File

@ -88,7 +88,7 @@ function validateLogic(nodes, edges, errors, warnings) {
const questions = node.data.questions || [] const questions = node.data.questions || []
// Prompt ausgewählt? // Prompt ausgewählt?
if (!node.data.prompt_id) { if (!node.data.prompt_slug) {
errors.push({ errors.push({
type: 'config', type: 'config',
message: `Analysis-Node "${node.data.label}" hat keinen Prompt`, message: `Analysis-Node "${node.data.label}" hat keinen Prompt`,