From fc31d46f4e16e920f3872aee1c2ed512b12c8bd6 Mon Sep 17 00:00:00 2001 From: digital-garbage <133010426+digital-garbage@users.noreply.github.com> Date: Sat, 16 May 2026 16:23:34 +0300 Subject: [PATCH] Inject diagnostic into repair system prompt in Full mode When Pass 1 generates a diagnostic, append it to the system prompt of Pass 2 so the LLM has the session root-cause analysis at the highest priority level rather than only as a user-message field. The analysis remains in the user message too for reference. Co-Authored-By: Claude Sonnet 4.6 --- conditioning.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/conditioning.py b/conditioning.py index fe05b50a..7f73bafb 100644 --- a/conditioning.py +++ b/conditioning.py @@ -9330,7 +9330,10 @@ class FunPackVideoRefinerV2(FunPackVideoRefiner): user_lines.append("") user_lines.append("Write the corrected prompt.") - return V2_PROMPT_ADVISOR_SYSTEM_PROMPT.strip(), "\n".join(user_lines) + system = V2_PROMPT_ADVISOR_SYSTEM_PROMPT.strip() + if analysis: + system += f"\n\nSession diagnostic: {analysis}" + return system, "\n".join(user_lines) def _v2_generate_advisor_text(self, clip, system_prompt, user_prompt, seed=None, image=None, thinking=True, max_length=800): if clip is None or not hasattr(clip, "generate") or not hasattr(clip, "decode"):