33#include <unordered_set>
79 size_t shown()
const {
return seen_.size(); }
82 std::unordered_set<size_t> seen_;
97 const char*
v = std::getenv(
"ENTROPIC_LOG_FULL_PROMPT");
98 return v !=
nullptr &&
v[0] ==
'1';
117 const std::string& role,
121 int n = std::snprintf(
123 "[%zu] role=%s [shown above, %zu chars, hash=%016zx]",
125 return std::string(
buf,
n > 0 ?
static_cast<size_t>(
n) : 0
U);
Remembers which message bodies a session's log has already shown.
size_t shown() const
How many distinct bodies have been shown.
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.
Activate model on GPU (WARM → ACTIVE).
bool prompt_log_unabridged()
Whether the operator has demanded unabridged prompt logs.
@ optional
optional: every escape asks the host's path approver
std::string prompt_log_reference(size_t index, const std::string &role, size_t size_chars, size_t content_hash)
The one-line stand-in for a body already shown earlier in the log.