feat: enhancer's Last run shows the chat the model was sent
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
9436bcfc58
commit
dfae8915fc
+7
-2
@@ -10787,11 +10787,13 @@ class FunPackVideoRefinerV2(FunPackVideoRefiner):
|
||||
thinking=prompt_enhance_thinking, image=prompt_enhance_image,
|
||||
**_enhance_sampling,
|
||||
)
|
||||
_chat_sent = self._v2_enhancer_chat(prompt_enhance_chat)
|
||||
print(f"[FunPackVideoRefinerV2] {_enhance_status}")
|
||||
self._v2_note_enhanced({
|
||||
"scene": None, "before": _before, "after": prompt_to_encode,
|
||||
"status": _enhance_status, "image": prompt_enhance_image is not None,
|
||||
"reference": _ref.strip(), "thinking": self._v2_last_thinking})
|
||||
"reference": _ref.strip(), "chat": _chat_sent.strip(),
|
||||
"thinking": self._v2_last_thinking})
|
||||
|
||||
# Studio's `enhanced_prompt` output, for a node encoding on its own (Editor link
|
||||
# "Enhanced prompt, fallback to prompt + postfix"). The same text that link's
|
||||
@@ -10812,6 +10814,7 @@ class FunPackVideoRefinerV2(FunPackVideoRefiner):
|
||||
self._v2_note_enhanced({
|
||||
"scene": None, "before": _whole, "after": _after, "status": _st,
|
||||
"image": prompt_enhance_image is not None, "reference": _ref.strip(),
|
||||
"chat": self._v2_enhancer_chat(prompt_enhance_chat).strip(),
|
||||
"thinking": self._v2_last_thinking})
|
||||
_whole = _after
|
||||
self._v2_enhanced_output = _whole
|
||||
@@ -11066,7 +11069,9 @@ class FunPackVideoRefinerV2(FunPackVideoRefiner):
|
||||
self._v2_note_enhanced({
|
||||
"scene": _i, "before": t, "after": _after, "status": _st,
|
||||
"image": prompt_enhance_image is not None,
|
||||
"reference": _ref.strip(), "thinking": self._v2_last_thinking})
|
||||
"reference": _ref.strip(),
|
||||
"chat": self._v2_enhancer_chat(prompt_enhance_chat, _i).strip(),
|
||||
"thinking": self._v2_last_thinking})
|
||||
_enhanced_texts.append(_after)
|
||||
split_scene_texts = _enhanced_texts
|
||||
scene_refinement_keys = [set(s.get("keys") or set()) for s in canon_scenes]
|
||||
|
||||
@@ -1077,6 +1077,13 @@
|
||||
el("div", "enh-before-text enh-ref-sent", ref));
|
||||
card.append(det);
|
||||
}
|
||||
// The Chat tab's conversation exactly as the model received it (empty = none sent).
|
||||
const chat = String(it.chat || "").trim();
|
||||
if (chat) {
|
||||
const det = el("details", "enh-before");
|
||||
det.append(el("summary", null, "Chat sent"), el("div", "enh-before-text enh-ref-sent", chat));
|
||||
card.append(det);
|
||||
}
|
||||
if (it.status) card.append(el("div", "enh-status", String(it.status)));
|
||||
return card;
|
||||
}
|
||||
|
||||
@@ -637,3 +637,10 @@ def test_every_enhancement_path_passes_the_chat():
|
||||
import inspect
|
||||
src = inspect.getsource(C.FunPackVideoRefinerV2.refine_v2)
|
||||
assert src.count("chat=self._v2_enhancer_chat(prompt_enhance_chat") == 3
|
||||
|
||||
|
||||
def test_every_readout_says_what_chat_the_model_was_sent():
|
||||
"""Last run ▸ "Chat sent" is how a user checks what the model actually read."""
|
||||
import inspect
|
||||
src = inspect.getsource(C.FunPackVideoRefinerV2.refine_v2)
|
||||
assert src.count('"chat": ') == 3
|
||||
|
||||
Reference in New Issue
Block a user