Skip to content

ai_assistant_conversation_export_shrink_tool_calls

github-actions[bot] edited this page Sep 11, 2026 · 4 revisions

Filters messages before transcript-style exports render them.

The built-in filter shrinks tool calls by removing provider IDs and redacting full read_file/write_file contents. Plugins that export readable formats such as EPUB can apply this same filter.

Auto-generated Example

add_filter(
   'ai_assistant_conversation_export_shrink_tool_calls',
    function(
        array $messages,
        array $conversation,
        array $format
    ) {
        // Your code here.
        return $messages;
    },
    10,
    3
);

Parameters

  • array $messages Conversation messages.
  • array $conversation Full conversation export data.
  • array $format Export format definition.

Files

apply_filters('ai_assistant_conversation_export_shrink_tool_calls', $messages, $conversation, $format)

← All Hooks

Clone this wiki locally