Enhance memory search functionality with timeline context retrieval (#151)
- Introduced optional timeline context retrieval step in memory search flow to provide users with better understanding of previous sessions. - Updated SKILL.md to reflect new flow, including timeline context commands and usage scenarios. - Refactored timeline retrieval commands in timeline-by-query.md and timeline.md to utilize new MCP tools for streamlined access. - Implemented filtering logic in search-server.ts to respect depth_before and depth_after parameters when displaying timeline items. - Improved response formatting to include filtered item counts and enhanced user guidance for timeline queries.
This commit is contained in:
@@ -9,14 +9,16 @@ Search for observations and get timeline context in a single request. Combines s
|
||||
- User asks: "Timeline of database work"
|
||||
- Need to find something then see temporal context
|
||||
|
||||
## Command
|
||||
## MCP Tool
|
||||
|
||||
```bash
|
||||
Use the `get_timeline_by_query` MCP tool:
|
||||
|
||||
```
|
||||
# Auto mode: Uses top search result as timeline anchor
|
||||
curl -s "http://localhost:37777/api/timeline/by-query?query=authentication&mode=auto&depth_before=10&depth_after=10"
|
||||
get_timeline_by_query(query="authentication", mode="auto", depth_before=10, depth_after=10)
|
||||
|
||||
# Interactive mode: Shows top N search results for manual selection
|
||||
curl -s "http://localhost:37777/api/timeline/by-query?query=authentication&mode=interactive&limit=5"
|
||||
get_timeline_by_query(query="authentication", mode="interactive", limit=5)
|
||||
```
|
||||
|
||||
## Parameters
|
||||
@@ -34,8 +36,8 @@ curl -s "http://localhost:37777/api/timeline/by-query?query=authentication&mode=
|
||||
|
||||
Automatically gets timeline around best match:
|
||||
|
||||
```bash
|
||||
curl -s "http://localhost:37777/api/timeline/by-query?query=JWT+authentication&mode=auto&depth_before=10&depth_after=10"
|
||||
```
|
||||
get_timeline_by_query(query="JWT authentication", mode="auto", depth_before=10, depth_after=10)
|
||||
```
|
||||
|
||||
**Response:**
|
||||
@@ -64,8 +66,8 @@ curl -s "http://localhost:37777/api/timeline/by-query?query=JWT+authentication&m
|
||||
|
||||
Shows top search results for manual review:
|
||||
|
||||
```bash
|
||||
curl -s "http://localhost:37777/api/timeline/by-query?query=authentication&mode=interactive&limit=5"
|
||||
```
|
||||
get_timeline_by_query(query="authentication", mode="interactive", limit=5)
|
||||
```
|
||||
|
||||
**Response:**
|
||||
@@ -89,7 +91,7 @@ curl -s "http://localhost:37777/api/timeline/by-query?query=authentication&mode=
|
||||
"score": 0.87
|
||||
}
|
||||
],
|
||||
"next_step": "Use /api/timeline/context?anchor=<id>&depth_before=10&depth_after=10"
|
||||
"next_step": "Use get_context_timeline(anchor=<id>, depth_before=10, depth_after=10)"
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user