Nodes/ComfyUI_LLM_Embeder/Chat History Viewer
ComfyUI Node

Chat History Viewer

Stop squinting at the last reply and read the whole conversation

By Conlller·Created 8 months ago·Updated 4 days ago· 0
Chat History Viewer
    • history
    history

    When you're chatting with an LLM to refine a prompt, the last reply is rarely the whole story. You want to see how the conversation drifted - what the model was told, which regeneration actually landed, whether the system prompt took effect. The Chat History Viewer is the pack's answer to that, and it's the simplest node in the bunch: feed it the transcript, get a readable, scrollable record.

    It's a display node first and foremost - is_output_node: true, the kind of node that's meant to sit at the end of a wire and show you something. It's not where the work happens, and that's fine. In the intended setup it hangs off the second output of Chat (Ollama), parked next to your prompt chain so you can audit what the LLM actually said before its answer goes off to the optimizer.

    How it works

    The node has exactly one input - history, a multiline string - and it passes that string straight through its one output. What makes it useful is the frontend that ships with the pack. The web/chat_optimize.js extension rebuilds the widget into a proper scrollable monospace panel and adds an Open History button that pops a full-screen modal with the entire transcript, auto-scrolled to the bottom. Esc or clicking outside closes it. The pass-through output matters too: because history echoes back out, you can chain the viewer into other nodes without breaking the wire.

    How to use it

    Wire the readable_history output of a Chat (Ollama) node into the viewer's history input. That output is populated on every real action - send, regenerate, and deliver_to_optimizer all update it - so the panel always reflects the current session. It's formatted as Role: content blocks, which is nothing fancy, but it's exactly what you need to check whether the conversation is going where you want before you commit the final answer to your prompt optimizer.

    Install is the pack install: ComfyUI Manager → search ComfyUI_LLM_Embeder, or git clone https://github.com/RCAKangle/ComfyUI_LLM_Embeder into ComfyUI/custom_nodes/ and restart. Nothing else - no requirements.txt, no models, no keys.

    The honest caveat

    This node can only show you what the chat node hands it, and there are two ways that bites. First, the transcript is in-memory only: restart ComfyUI and the history is gone, so don't rely on the viewer as a record store. Second, if the Chat node errored mid-conversation, the "assistant" turn in here will be a [chat error] ... line - the viewer faithfully displays the problem, it just can't tell you it's a problem. And since a clear action returns an empty history, a blank viewer is usually a sign you hit clear rather than a bug.

    Verdict

    A thin utility, and it knows it. If you only ever send one message and read one reply, you can skip it entirely - the Chat node's own widgets show enough. But the moment you start doing real multi-turn prompt refinement with a system prompt and a few regenerations, the full-transcript view stops being a nicety and starts being the thing that tells you whether the model understood you. Cheap to add, zero maintenance, worth having in the workflow.

    CategoryChatOptimize

    Inputs (1)

    NameTypeDefaultDescription
    historySTRING

    Outputs (1)

    NameTypeDescription
    historySTRING