Skip to content

pinMessage

function pinMessage(messages, index): void;

Defined in: src/conversation-manager/pin-message.ts:52

Pin a message so it is protected from eviction during context reduction. Mutates the message in place by setting metadata.custom.pinned = true.

ParameterTypeDescription
messagesMessage[]The messages array containing the message to pin.
indexnumberThe index of the message to pin.

void