setMessageFilter

expect fun setMessageFilter(filter: (FeatureMessage) -> Boolean)(source)

Sets the message filter used to determine which feature messages should be processed.

The provided filter function is invoked for each incoming feature message. If the filter function returns true, the message is deemed to meet the criteria for further processing.

Parameters

filter

A lambda function that accepts a FeatureMessage and returns a boolean indicating whether the message should be processed (true) or ignored (false).

Example:

processor.setMessageFilter { message ->
message is LLMCallStartingEvent ||
message is LLMCallCompletedEvent
}
actual fun setMessageFilter(filter: (FeatureMessage) -> Boolean)(source)

Sets the message filter used to determine which feature messages should be processed.

The provided filter function is invoked for each incoming feature message. If the filter function returns true, the message is deemed to meet the criteria for further processing.

Parameters

filter

A lambda function that accepts a FeatureMessage and returns a boolean indicating whether the message should be processed (true) or ignored (false).

actual fun setMessageFilter(filter: (FeatureMessage) -> Boolean)(source)

Sets the message filter used to determine which feature messages should be processed.

The provided filter function is invoked for each incoming feature message. If the filter function returns true, the message is deemed to meet the criteria for further processing.

Parameters

filter

A lambda function that accepts a FeatureMessage and returns a boolean indicating whether the message should be processed (true) or ignored (false).