WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Conversation

@qiuxsgit
Copy link

No description provided.

@qiuxsgit qiuxsgit requested a review from xpzouying as a code owner November 10, 2025 02:01
Copy link
Owner

@xpzouying xpzouying left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

感谢PR,我就不 review #291 感觉和当前这个 PR 一样。

Comment on lines +600 to +622
func (s *AppServer) handleListMyFeeds(ctx context.Context) *MCPToolResult {
myProfile, err := s.xiaohongshuService.GetMyProfile(ctx)

if err != nil {
return &MCPToolResult{
Content: []MCPContent{{
Type: "text",
Text: "获取我的个人信息失败: " + err.Error(),
}},
IsError: true,
}
}

jsonData, err := json.MarshalIndent(myProfile.Feeds, "", " ")
if err != nil {
return &MCPToolResult{
Content: []MCPContent{{
Type: "text",
Text: fmt.Sprintf("获取我的个人信息,但序列化失败: %v", err),
}},
IsError: true,
}
}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

该函数和 handleGetMyProfile 返回都是一样,所以我在想要不要增加两个函数,还是一个即可?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我的想法是这样可以在特定场景节省一些token

@xpzouying xpzouying closed this Dec 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants