Skip to content

Message Filtering

Quickly find what you need in massive conversations, as easy as using a search engine.

Why Message Filtering?

After a full day of pair programming with AI, your conversation history might have hundreds of messages. Want to find a specific discussion? Scrolling through each message is time-consuming and tedious.

Message Filtering is Mantra's "precise targeting" capability:

  • Filter by type: View only AI responses, or only code-related messages
  • Keyword search: Enter keywords to instantly locate relevant conversations
  • Highlighted results: Search results are crystal clear, no more searching for a needle in a haystack

Simple Analogy

If Time Travel is like a "video progress bar", then Message Filtering is like a "chapter index"—helping you quickly jump to the part you want to see.

Common Use Cases

ScenarioFiltering Method
Only want to see what code AI wroteType filter: Show only AI responses
Find conversations about a specific functionSearch the function name
View all tool execution recordsType filter: Show only tool calls
Review all questions you askedType filter: Show only user messages

Filter by Type

Supported Message Types

Mantra can distinguish multiple message types for targeted filtering:

IconTypeDescription
👤User MessagesContent you send to the AI
🤖AI ResponsesAI replies and generated code
🔧Tool CallsTools used by AI and execution results
⚙️System MessagesSystem prompts and status information

How to Use Type Filtering

  1. Find the filter button above the conversation panel
  2. Click to expand filter options
  3. Select the message types you want to view
  4. The conversation list updates immediately, showing only matching messages

Quick Switch

The filter button usually displays the number of selected types, helping you know if filters are active.

Combined Filtering

You can select multiple message types simultaneously for more precise filtering:

  • User Messages + AI Responses: See only conversation content, hide tool calls
  • AI Responses + Tool Calls: Focus on AI's operations and outputs
  • Tool Calls Only: Quickly browse all executed commands and results

Note

Filtering only affects the display—it doesn't delete or modify any message records. All messages reappear when you clear the filters.

Search Feature

When you know what to find but not where, search is the fastest way:

  1. Click the search icon or use shortcut Cmd/Ctrl + F
  2. Enter keywords in the search box
  3. Matching messages appear immediately
  4. Keywords are highlighted in the messages

Search Result Navigation

After finding search results, you can:

  • View match count: The search box shows "N results"
  • Navigate through results: Use up/down arrows to switch between results
  • Click directly: Click any search result to jump to that message

Search Tips

Search Tips

Case Insensitive Searching function and Function yields the same results.

Supports Partial Matching Typing auth can find authentication, authorize, OAuth, etc.

Searches Code Content Function names, variable names, even error messages are searchable.

Better When Combined Use type filtering first to narrow scope, then search for precise targeting.

Search Scope

Search looks through the entire message content, including code blocks, tool outputs, and system information.

Using with Time Travel

Message Filtering combined with Time Travel is even more powerful.

Filter Then Jump to Code

Typical combined workflow:

  1. Filter key messages: e.g., show only AI responses
  2. Search specific content: e.g., search for a function name
  3. Click target message: Trigger Time Travel
  4. View code changes: Right panel shows code at that point in time

Quickly Locate Key Nodes

When conversations are long, filtering helps you skip irrelevant content:

GoalMethod
Find where AI first implemented a featureSearch feature name → Click earliest match
View all code modificationsFilter to AI responses only → Click through to see changes
Find error discussionsSearch error keywords → Jump to related conversation

Efficient Browsing Tips

  1. Use type filtering to hide tool calls first (usually numerous)
  2. Use Time Travel on the filtered list
  3. This lets you focus on conversation content, ignoring technical details

Combined Usage Example

Scenario: Want to see how the handleSubmit function evolved

  1. Open message filtering, show only AI responses
  2. Search for handleSubmit
  3. Starting from the first result, click through each one
  4. Watch the function change in the right code panel
  5. Like watching a documentary, see the function's "growth story"

Keyboard Shortcuts

Use shortcuts for more efficient filtering and searching:

ShortcutFunction
Cmd/Ctrl + FOpen search box
EscClose search / Clear filters
EnterJump to next search result
Shift + EnterJump to previous search result

Keyboard Shortcut Notes

These shortcuts follow common browser and application standards. Actual behavior may vary slightly by Mantra version—refer to in-app tooltips for confirmation.

Continuous Operations

After pressing Cmd/Ctrl + F to open search, you can start typing immediately. Press Enter to quickly jump between results, even more efficient with Time Travel.

For more shortcuts, see Keyboard Reference.

Best Practices

Efficient Usage Tips

  1. Filter First, Then Search

    • Type filtering can significantly reduce candidate messages
    • Searching among fewer messages is faster and more accurate
  2. Use Combined Filtering

    • AI responses only: Focus on AI's actual output
    • Hide system messages: Reduce distracting information
  3. Use Keywords When Searching

    • Function names and variable names are more precise than descriptive words
    • Error codes are easier to find than error descriptions

Common Workflows

Code Review Workflow:

  1. Filter to show AI responses only
  2. Start from the beginning, click through each to see code changes
  3. When you spot issues, search related function names to dig deeper

Troubleshooting Workflow:

  1. Search for error messages or related keywords
  2. Jump to where it first appeared
  3. Review context to understand the cause

FAQ

Search returns no results?

Possible causes:

  1. Keyword spelling error

    • Check spelling, especially function and variable names in code
    • Try shorter keywords (partial matching)
  2. Hidden by type filter

    • Clear type filters first, then search again
    • Check if target message type is in filter range
  3. Content in collapsed area

    • Some long messages may be collapsed
    • Search includes collapsed content, but may not be intuitive

Solution: Press Esc to clear all filters, confirm the message exists, then filter again.

How to reset filter conditions?

Quick reset:

  • Press Esc to close search and clear filters
  • Click filter button, select "All" or "Reset"

Manual reset:

  • Reselect all types in type filter
  • Clear search box content

After reset, all messages will be visible again.

What's the difference between filtering and searching?

Type Filtering:

  • Filters by message "identity" (who sent it)
  • Can remain active continuously
  • Good for extended browsing

Keyword Search:

  • Searches by message "content" (what was said)
  • Usually for quick location
  • Typically closed after finding

Best Practice: Combine both for best results. Use type filtering to narrow scope, then search for precise targeting.

Does filtering affect Time Travel?

No.

Filtering only changes which messages are displayed, it doesn't affect Time Travel functionality:

  • Hidden messages still exist on the timeline
  • Clicking any visible message still triggers Time Travel normally
  • Code snapshots include all files, unaffected by filtering

The benefit of filtering is making it easier to find the message you want to click.

Next Steps

After mastering Message Filtering, explore more features: