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
| Scenario | Filtering Method |
|---|---|
| Only want to see what code AI wrote | Type filter: Show only AI responses |
| Find conversations about a specific function | Search the 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 can distinguish multiple message types for targeted filtering:
| Icon | Type | Description |
|---|---|---|
| 👤 | User Messages | Content you send to the AI |
| 🤖 | AI Responses | AI replies and generated code |
| 🔧 | Tool Calls | Tools used by AI and execution results |
| ⚙️ | System Messages | System prompts and status information |
How to Use Type Filtering
- Find the filter button above the conversation panel
- Click to expand filter options
- Select the message types you want to view
- 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
Keyword Search
When you know what to find but not where, search is the fastest way:
- Click the search icon or use shortcut
Cmd/Ctrl + F - Enter keywords in the search box
- Matching messages appear immediately
- 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:
- Filter key messages: e.g., show only AI responses
- Search specific content: e.g., search for a function name
- Click target message: Trigger Time Travel
- 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:
| Goal | Method |
|---|---|
| Find where AI first implemented a feature | Search feature name → Click earliest match |
| View all code modifications | Filter to AI responses only → Click through to see changes |
| Find error discussions | Search error keywords → Jump to related conversation |
Efficient Browsing Tips
- Use type filtering to hide tool calls first (usually numerous)
- Use Time Travel on the filtered list
- This lets you focus on conversation content, ignoring technical details
Combined Usage Example
Scenario: Want to see how the handleSubmit function evolved
- Open message filtering, show only AI responses
- Search for
handleSubmit - Starting from the first result, click through each one
- Watch the function change in the right code panel
- Like watching a documentary, see the function's "growth story"
Keyboard Shortcuts
Use shortcuts for more efficient filtering and searching:
| Shortcut | Function |
|---|---|
Cmd/Ctrl + F | Open search box |
Esc | Close search / Clear filters |
Enter | Jump to next search result |
Shift + Enter | Jump 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
Filter First, Then Search
- Type filtering can significantly reduce candidate messages
- Searching among fewer messages is faster and more accurate
Use Combined Filtering
- AI responses only: Focus on AI's actual output
- Hide system messages: Reduce distracting information
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:
- Filter to show AI responses only
- Start from the beginning, click through each to see code changes
- When you spot issues, search related function names to dig deeper
Troubleshooting Workflow:
- Search for error messages or related keywords
- Jump to where it first appeared
- Review context to understand the cause
FAQ
Search returns no results?
Possible causes:
Keyword spelling error
- Check spelling, especially function and variable names in code
- Try shorter keywords (partial matching)
Hidden by type filter
- Clear type filters first, then search again
- Check if target message type is in filter range
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
Escto 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:
- Time Travel - Replay code evolution
- Content Redaction - Protect sensitive code information
- Keyboard Reference - Improve operational efficiency
