feat: 添加搜索功能 (#16)

- 新增 SearchFeeds 服务方法,支持关键词搜索小红书内容
- 添加 search_feeds MCP 工具,提供搜索接口
- 新增 /api/v1/feeds/search API 端点
- 实现搜索页面的浏览器自动化操作
- 优化 MCP 协议支持,处理 notifications/initialized 和 notifications/cancelled 通知
- 更新文档,添加搜索功能说明和使用示例
- 重构类型定义,优化数据结构

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
zy
2025-08-17 23:35:22 +08:00
committed by GitHub
parent a0a063d418
commit aa09687751
11 changed files with 241 additions and 18 deletions

View File

@@ -19,15 +19,11 @@ type FeedsValue struct {
// Feed 表示单个 Feed 项目
type Feed struct {
XsecToken string `json:"xsecToken"`
ID string `json:"id"`
ModelType string `json:"modelType"`
NoteCard NoteCard `json:"noteCard"`
TrackID string `json:"trackId"`
Ignore bool `json:"ignore"`
Index int `json:"index"`
Exposed bool `json:"exposed"`
SSRRendered bool `json:"ssrRendered"`
XsecToken string `json:"xsecToken"`
ID string `json:"id"`
ModelType string `json:"modelType"`
NoteCard NoteCard `json:"noteCard"`
Index int `json:"index"`
}
// NoteCard 表示笔记卡片信息
@@ -53,6 +49,12 @@ type User struct {
type InteractInfo struct {
Liked bool `json:"liked"`
LikedCount string `json:"likedCount"`
SharedCount string `json:"sharedCount"`
CommentCount string `json:"commentCount"`
CollectedCount string `json:"collectedCount"`
Collected bool `json:"collected"`
}
// Cover 表示封面信息