Recordp appends an event with an attached payload (full request JSON, tool output, before/after transcript) and returns its ID. Payload is truncated to a fixed per-event cap so a chatty conversation can't blow up memory.
(source string, level Level, message, payload string)
| 94 | // truncated to a fixed per-event cap so a chatty conversation can't blow |
| 95 | // up memory. |
| 96 | func Recordp(source string, level Level, message, payload string) uint64 { |
| 97 | return record(0, source, level, message, truncatePayload(payload)) |
| 98 | } |
| 99 | |
| 100 | // Recordpc is Recordp with a correlation back to a previously-recorded |
| 101 | // event. The new event's CorrelatedID is set to startID; Pair() can then |