fix: Analysis page now uses unified prompt executor (Issue #28)
BREAKING: Analysis page switched from old /insights/run to new /prompts/execute Changes: - Backend: Added save=true parameter to /prompts/execute - When enabled, saves final output to ai_insights table - Extracts content from pipeline output (last stage) - Frontend api.js: Added save parameter to executeUnifiedPrompt() - Frontend Analysis.jsx: Switched from api.runInsight() to api.executeUnifiedPrompt() - Transforms new result format to match InsightCard expectations - Pipeline outputs properly extracted and displayed Fixes: PIPELINE_MASTER responses (old template being sent to AI) The old /insights/run endpoint used raw template field, which for the legacy "pipeline" prompt was literally "PIPELINE_MASTER". The new executor properly handles stages and data processing. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
811ba8b3dc
commit
97e57481f9
3 files changed
+50
-3
No files matched your search
@@ -307,9 +307,10 @@ export const api = {
|
||||
executePipeline: (configId=null) => req('/insights/pipeline' + (configId ? `?config_id=${configId}` : ''), json({})),
|
||||
|
||||
// Unified Prompt System (Issue #28 Phase 2)
|
||||
executeUnifiedPrompt: (slug, modules=null, timeframes=null, debug=false) => {
|
||||
executeUnifiedPrompt: (slug, modules=null, timeframes=null, debug=false, save=false) => {
|
||||
const params = new URLSearchParams({ prompt_slug: slug })
|
||||
if (debug) params.append('debug', 'true')
|
||||
if (save) params.append('save', 'true')
|
||||
const body = {}
|
||||
if (modules) body.modules = modules
|
||||
if (timeframes) body.timeframes = timeframes
|
||||
|
||||
Reference in new issue
Block a user