Entropic 2.14.3
Local-first agentic inference engine
Loading...
Searching...
No Matches
entropic::PromptLogDedup Class Reference

Remembers which message bodies a session's log has already shown. More...

#include </home/runner/work/entropic/entropic/src/core/prompt_log_util.h>

Public Member Functions

bool note (size_t content_hash)
 Record a message body and say whether to log it in full.
 
void reset ()
 Forget everything, so the next turn logs in full again.
 
size_t shown () const
 How many distinct bodies have been shown.
 

Detailed Description

Remembers which message bodies a session's log has already shown.

Keyed by content hash, not by index: a message's index shifts as the conversation is compacted, but its content is what a reader would be double-counting.

Version
2.12.2

Definition at line 46 of file prompt_log_util.h.

Member Function Documentation

◆ note()

bool entropic::PromptLogDedup::note ( size_t  content_hash)
inline

Record a message body and say whether to log it in full.

First sighting logs in full; every later sighting is a reference.

Parameters
content_hashHash of the message body.
Returns
true the first time this body is seen, false afterwards. @utility
Version
2.12.2

Definition at line 58 of file prompt_log_util.h.

◆ reset()

void entropic::PromptLogDedup::reset ( )
inline

Forget everything, so the next turn logs in full again.

Used when the conversation itself is replaced (a cleared context, a different session), where re-showing the bodies is correct.

@utility

Version
2.12.2

Definition at line 71 of file prompt_log_util.h.

◆ shown()

size_t entropic::PromptLogDedup::shown ( ) const
inline

How many distinct bodies have been shown.

Returns
Count of full logs emitted so far. @utility
Version
2.12.2

Definition at line 79 of file prompt_log_util.h.


The documentation for this class was generated from the following file: