feat: debug system for prompt execution (Issue #28)
Deploy Development / deploy (push) Successful in 50s
Build Test / lint-backend (push) Successful in 0s
Build Test / build-frontend (push) Successful in 13s

- Backend: debug mode in prompt_executor with placeholder tracking
- Backend: show resolved/unresolved placeholders, final prompts, AI responses
- Frontend: test button in UnifiedPromptModal for saved prompts
- Frontend: debug output viewer with JSON preview
- Frontend: wider placeholder example fields in PlaceholderPicker

Resolves pipeline execution debugging issues.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
LarsandClaude Opus 4.6 committed 2026-03-26 08:01:33 +01:00
1 parent 4ba03c2a94
commit 7f2ba4fbad
4 files changed
+211 -33

No files matched your search

+5 -2
View File
@@ -699,6 +699,7 @@ async def execute_unified_prompt(
prompt_slug: str,
modules: Optional[dict] = None,
timeframes: Optional[dict] = None,
debug: bool = False,
session: dict = Depends(require_auth)
):
"""
@@ -708,9 +709,10 @@ async def execute_unified_prompt(
prompt_slug: Slug of prompt to execute
modules: Dict of enabled modules (e.g., {"körper": true})
timeframes: Dict of timeframes per module (e.g., {"körper": 30})
debug: If true, include debug information (placeholders, final prompts, etc.)
Returns:
Execution result with outputs
Execution result with outputs (and debug info if debug=true)
"""
profile_id = session['profile_id']
@@ -739,7 +741,8 @@ async def execute_unified_prompt(
profile_id=profile_id,
modules=modules,
timeframes=timeframes,
openrouter_call_func=call_openrouter
openrouter_call_func=call_openrouter,
enable_debug=debug
)
return result