Add searchMessages() method to query inside session history
- Ngôn ngữ chính
- Java
- Star
- 10.5k
- Fork
- 1.5k
- Merge trung bình
- 1 ngày 11 giờ
- Pull request đã merge (30 ngày)
- 127
Mô tả
## Summary
Implement a searchMessages() method across all SDK languages to enable
in-session message filtering and search.
## Problem
Users currently has to manually filter through all
session events to find specific messages. This is cumbersome for:
- Debugging long conversations
- Finding specific agent responses
- Building audit/search features on top of the SDK
## Proposed Solution
Add async searchMessages(query, options) method that:
- Accepts string or regex patterns
- Filters by event type (optional)
- Supports case-sensitive/insensitive search
- Returns filtered SessionEvent[] matching criteria
## Example Usage
```typescript
// TypeScript
const results = await session.searchMessages("authentication");
const assistantMsgs = await session.searchMessages("deploy", {
eventType: "assistant.message"
});
Hướng dẫn đóng góp
Hướng nghiên cứu
Start by locating the session history and SessionEvent APIs in each SDK language, then compare existing asynchronous query or filtering patterns. Done means searchMessages(query, options) is available across all SDKs and supports string or regex matching, event-type filtering, case sensitivity options, and filtered SessionEvent results.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- java, typescript
- Lĩnh vực
- api, developer-experience
- Loại issue
- Tính năng
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức độ hoạt động
- Sôi nổi
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 45/100