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
| Scenario | Filtering Method |
|---|---|
| Only want to see what code AI wrote | Type Filter: Show only AI responses |
| Find a discussion about a specific function | Search function name |
| View all tool execution records | Type Filter: Show only tool calls |
| Review all questions you asked | Type 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:
| Icon | Type | Description |
|---|---|---|
| 💬 | Conversation | Normal text conversation (User and AI) |
| 🔧 | Tool | Tool calls and execution results |
| 📄 | File | File read/write operations |
| $ | Command | Terminal command execution |
| 💭 | Thinking | AI's thinking process (Thinking Block) |
| 🔍 | Search | Search-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
- Find the filter bar above the conversation panel.
- Click the corresponding Chip (e.g., "Tool", "File").
- The Chip changes color to indicate selection. Supports selecting multiple types simultaneously (OR logic, i.e., showing messages that match any selected type).
- 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
Keyword Search
When you know what you are looking for but not where it is, searching is the fastest way:
- Click the search icon on the right side of the filter bar, or use the shortcut
Cmd/Ctrl + F. - Enter keywords in the search box.
- Matching messages appear immediately.
- Keywords are highlighted in the messages.
Combined Search
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:
| Element | Function |
|---|---|
| Keyword display | Shows the current search term |
| Counter | e.g. "2/5", showing current position |
| Previous / Next | Navigate between matches, with wrap-around |
Navigation Shortcuts
| Shortcut | Function |
|---|---|
Enter | Jump to next match |
Shift + Enter | Jump to previous match |
Esc | Clear all highlights |
Combining with Time Travel
Message Filtering and Time Travel work powerfully together.
Jump to Code after Filtering
Typical combined workflow:
- Filter Key Messages: e.g., only show "File" type.
- Search Specific File: e.g., search
user_controller.ts. - Click Target Message: Triggers Time Travel.
- View Code Changes: Right panel displays code at that time point.
Shortcuts
Use shortcuts to filter and search more efficiently:
| Shortcut | Function |
|---|---|
Cmd/Ctrl + F | Focus Search Box |
Esc | Clear Search / Exit Search / Clear Highlights |
Enter | Jump to next match (search result navigation mode) |
Shift + Enter | Jump 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:
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.
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:
- Time Travel - Replay code evolution
- Modes - Switch between Playback and Refine modes
- Content Redaction - Protect sensitive code info
