Skip to content

Message Filtering

Find what you need in massive conversations quickly, just like using a search engine.

Why Message Filtering?

After a day of pair programming with AI, conversation logs can contain hundreds of messages. Want to find a specific discussion? Scrolling through one by one is time-consuming and tedious.

Message Filtering is Mantra's "Precision Targeting" capability:

  • Filter by Type: Only see AI responses, or only code-related messages.
  • Keyword Search: Enter keywords to instantly locate relevant conversations.
  • Result Highlighting: Search results are clear at a glance, no more needle in a haystack.

Simple Analogy

If Time Travel is the "video progress bar", then Message Filtering is the "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 a discussion about a specific functionSearch 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 distinguishes between various message types, allowing you to filter as needed. The new filter bar uses Chips style and supports multi-selection:

IconTypeDescription
💬ConversationNormal text conversation (User and AI)
🔧ToolTool calls and execution results
📄FileFile read/write operations
$CommandTerminal command execution
💭ThinkingAI's thinking process (Thinking Block)
🔍SearchSearch-related tool calls

Smart Association Display

To keep context intact, Mantra's filtering features smart association:

  • Tool Pairing: When you choose to view "Tool", the system automatically displays both the Tool Call Request and the Tool Execution Result. You won't see isolated requests or results; they always appear in pairs.

How to Use Type Filtering

  1. Find the filter bar above the conversation panel.
  2. Click the corresponding Chip (e.g., "Tool", "File").
  3. The Chip changes color to indicate selection. Supports selecting multiple types simultaneously (OR logic, i.e., showing messages that match any selected type).
  4. Click again to deselect.

Stats Info

The right side of the filter bar displays real-time statistics, such as Match: 15/200, letting you clearly know how much content is currently filtered.

Search Function

When you know what you are looking for but not where it is, searching is the fastest way:

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

Search box and Type Filtering can be combined (AND logic):

For example, you can select the "File" type and then enter "auth" in the search box. In this way, Mantra only displays messages that are related to file operations AND contain the keyword "auth".

Search Tips

Search Tips

Case Insensitive Searching for function and Function yields the same results.

Partial Match Supported Entering auth can find authentication, authorize, OAuth, etc.

Smart Debounce The system waits briefly (300ms) while typing to avoid frequent list refreshes.

Clear Search Press Esc or click the X button on the right of the search box to quickly clear search content.

Search Result Navigation (v0.9.1+)

When global search (sidebar search) returns results, clicking a search result precisely positions you at the matching message and lets you navigate between multiple matches within a session.

Precise Message Positioning

When you click a search result:

  • The message panel smoothly scrolls to the target message, centered with animation
  • Focused message: Displays a blue left border with a pulsing background glow
  • Other matches in the same session: Show a subtle blue marker

In-Message Keyword Highlighting

  • Matched keywords within message text are highlighted in yellow
  • Case-insensitive
  • Code blocks and thinking blocks are excluded from highlighting (to avoid visual noise)

Multi-Match Navigator

When a session has 2 or more matches, a floating navigator bar appears in the top-right of the narrative panel:

ElementFunction
Keyword displayShows the current search term
Countere.g. "2/5", showing current position
Previous / NextNavigate between matches, with wrap-around
ShortcutFunction
EnterJump to next match
Shift + EnterJump to previous match
EscClear all highlights

Combining with Time Travel

Message Filtering and Time Travel work powerfully together.

Jump to Code after Filtering

Typical combined workflow:

  1. Filter Key Messages: e.g., only show "File" type.
  2. Search Specific File: e.g., search user_controller.ts.
  3. Click Target Message: Triggers Time Travel.
  4. View Code Changes: Right panel displays code at that time point.

Shortcuts

Use shortcuts to filter and search more efficiently:

ShortcutFunction
Cmd/Ctrl + FFocus Search Box
EscClear Search / Exit Search / Clear Highlights
EnterJump to next match (search result navigation mode)
Shift + EnterJump to previous match (search result navigation mode)

Continuous Operation

After pressing Cmd/Ctrl + F to open search, you can type keywords directly. Combined with shortcuts in Refine Mode, you can quickly organize sessions.

For more shortcuts, please refer to Shortcuts Reference.

FAQ

Search returns no results?

Possible Reasons:

  1. Hidden by Type Filter

    • Check if you have selected certain Type Chips. If selected, search only occurs within those types.
    • Click "Clear Filter" button to reset all conditions.
  2. Content in Collapsed Area

    • Some long messages or thinking processes might be collapsed.

Solution: Click the Clear Filter button on the far right of the filter bar to reset all conditions and try again.

How to reset filter conditions?

Quick Reset:

  • Click the Clear Filter button on the far right of the filter bar (only appears when there are filter conditions).
  • Or manually deselect selected Chips and clear the search box.
Does filtering affect Time Travel?

No.

Filtering only changes the displayed message list, not the functionality of Time Travel:

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

Next Steps

After mastering Message Filtering, explore more features: