From 9074c3fbd0ad082e0d6015270589508fcc37e634 Mon Sep 17 00:00:00 2001 From: Janis Eccarius Date: Sun, 21 Jun 2026 17:19:00 +0200 Subject: [PATCH] fix(spark-analytics): replace multiline JS template literals with concatenation Multi-line template literals spanning unindented continuation lines break the YAML block scalar indentation, causing kustomize to fail with MalformedYAMLError. Co-Authored-By: Claude Sonnet 4.6 --- spark-analytics/base/webview.yaml | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/spark-analytics/base/webview.yaml b/spark-analytics/base/webview.yaml index 78f80d2..7f68ad1 100755 --- a/spark-analytics/base/webview.yaml +++ b/spark-analytics/base/webview.yaml @@ -188,19 +188,17 @@ data: row.map((v, j) => dataset.headers[j] + ': ' + v).join(', ') ).join('\\n'); - const systemPrompt = `You are a chess analytics expert. Explain what this dataset shows to a chess player. -Be concise but insightful — 3-6 sentences. Focus on what the data reveals about chess patterns, -player behaviour, or game dynamics. When column names reference chess openings (ECO codes, opening names), -explain what those openings are.`; + const systemPrompt = 'You are a chess analytics expert. Explain what this dataset shows to a chess player. ' + + 'Be concise but insightful — 3-6 sentences. Focus on what the data reveals about chess patterns, ' + + 'player behaviour, or game dynamics. When column names reference chess openings (ECO codes, opening names), ' + + 'explain what those openings are.'; - const userPrompt = `Dataset: "${dataset.label}" -Total rows: ${dataset.total_rows} -Columns: ${dataset.headers.join(', ')} - -Sample data (first ${dataset.sample.length} rows): -${sampleText} - -What does this dataset tell us about chess?`; + const userPrompt = 'Dataset: "' + dataset.label + '"\n' + + 'Total rows: ' + dataset.total_rows + '\n' + + 'Columns: ' + dataset.headers.join(', ') + '\n\n' + + 'Sample data (first ' + dataset.sample.length + ' rows):\n' + + sampleText + '\n\n' + + 'What does this dataset tell us about chess?'; try { const resp = await fetch(NIM_ENDPOINT, {