Skip to content

Conversation

arvinxx
Copy link
Member

@arvinxx arvinxx commented Jul 29, 2025

💻 变更类型 | Change Type

  • ✨ feat
  • 🐛 fix
  • ♻️ refactor
  • 💄 style
  • 👷 build
  • ⚡️ perf
  • 📝 docs
  • 🔨 chore

🔀 变更说明 | Description of Change

📝 补充信息 | Additional Information

Summary by Sourcery

Remove obsolete MCP sitemap functionality and cleanup related code across services, routers, tests, and client integration

Enhancements:

  • Delete getMcp and getMcpPageCount methods and drop MCP pagination from sitemap generation
  • Remove MCP-related tests and references in sitemap index and page routing
  • Eliminate getMcpIdentifiers endpoint, service method, and client-side hooks

Copy link

vercel bot commented Jul 29, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
lobe-chat-preview ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 29, 2025 6:38am

Copy link
Contributor

sourcery-ai bot commented Jul 29, 2025

Reviewer's Guide

This refactor removes all MCP-specific sitemap functionality and related identifier endpoints and hooks, streamlining sitemap generation by dropping MCP pagination, methods, tests, API routes, and client hooks.

Class diagram for Sitemap class after MCP sitemap removal

classDiagram
    class Sitemap {
        +getPluginPageCount()
        +getAssistantPageCount()
        +getModelPageCount()
        +getPlugins(page?)
        +getAssistants(page?)
        +getModels(page?)
        +getProviders(page?)
        +getIndex()
    }
Loading

Class diagram for DiscoverService after MCP identifier removal

classDiagram
    class DiscoverService {
        +getMcpList(params)
        +getPluginIdentifiers()
        +getModelIdentifiers()
        +getProviderIdentifiers()
        ...
    }
Loading

Class diagram for MCPAction interface after MCP identifier hook removal

classDiagram
    class MCPAction {
        +useFetchMcpDetail(params)
        +useFetchMcpList(params)
        +useMcpCategories(params)
    }
Loading

File-Level Changes

Change Details Files
Remove MCP pagination from sitemap generation
  • Dropped getMcpPageCount from sitemap index calculation
  • Removed MCP entries from sitemap index array
  • Eliminated MCP case in sitemap page switch
src/server/sitemap.ts
src/app/sitemap.tsx
Remove MCP sitemap method and tests
  • Deleted getMcp method from Sitemap class
  • Removed all getMcp-related test cases
src/server/sitemap.ts
src/server/sitemap.test.ts
Eliminate MCP identifiers API and service methods
  • Deleted marketRouter.getMcpIdentifiers procedure
  • Removed DiscoverService.getMcpIdentifiers implementation
src/server/routers/lambda/market/index.ts
src/server/services/discover/index.ts
Remove front-end MCP identifier hook and client call
  • Removed useMcpIdentifiers hook in MCP slice
  • Deleted getMcpIdentifiers method in front-end service
src/store/discover/slices/mcp/action.ts
src/services/discover.ts

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@lobehubbot
Copy link
Member

👍 @arvinxx

Thank you for raising your pull request and contributing to our Community
Please make sure you have followed our contributing guidelines. We will review it as soon as possible.
If you encounter any problems, please feel free to connect with us.
非常感谢您提出拉取请求并为我们的社区做出贡献,请确保您已经遵循了我们的贡献指南,我们会尽快审查它。
如果您遇到任何问题,请随时与我们联系。

Copy link
Contributor

gru-agent bot commented Jul 29, 2025

TestGru Assignment

Summary

Link CommitId Status Reason
Detail 5ad11c8 ✅ Finished

History Assignment

Files

File Pull Request
src/store/discover/slices/mcp/action.ts ❌ Failed (I failed to setup the environment.)
src/server/routers/lambda/market/index.ts ❌ Failed (I failed to setup the environment.)
src/server/services/discover/index.ts ❌ Failed (I failed to setup the environment.)

Tip

You can @gru-agent and leave your feedback. TestGru will make adjustments based on your input

@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Jul 29, 2025
Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @arvinxx - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Copy link

codecov bot commented Jul 29, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.64%. Comparing base (b8c0e2d) to head (5ad11c8).
⚠️ Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8596      +/-   ##
==========================================
+ Coverage   85.62%   85.64%   +0.01%     
==========================================
  Files         910      910              
  Lines       69311    69266      -45     
  Branches     6631     4759    -1872     
==========================================
- Hits        59350    59321      -29     
+ Misses       9961     9945      -16     
Flag Coverage Δ
app 85.64% <100.00%> (+0.01%) ⬆️
server 96.26% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@arvinxx arvinxx merged commit b9e3e66 into main Jul 29, 2025
23 of 24 checks passed
@arvinxx arvinxx deleted the refactor/remove-mcp branch July 29, 2025 06:55
@lobehubbot
Copy link
Member

❤️ Great PR @arvinxx ❤️

The growth of project is inseparable from user feedback and contribution, thanks for your contribution! If you are interesting with the lobehub developer community, please join our discord and then dm @arvinxx or @canisminor1990. They will invite you to our private developer channel. We are talking about the lobe-chat development or sharing ai newsletter around the world.
项目的成长离不开用户反馈和贡献,感谢您的贡献! 如果您对 LobeHub 开发者社区感兴趣,请加入我们的 discord,然后私信 @arvinxx@canisminor1990。他们会邀请您加入我们的私密开发者频道。我们将会讨论关于 Lobe Chat 的开发,分享和讨论全球范围内的 AI 消息。

github-actions bot pushed a commit that referenced this pull request Jul 29, 2025
### [Version&nbsp;1.105.2](v1.105.1...v1.105.2)
<sup>Released on **2025-07-29**</sup>

#### ♻ Code Refactoring

- **misc**: Clean mcp sitemap, refactor jose-JWT to xor obfuscation.

#### 💄 Styles

- **misc**: Add more OpenAI SDK Text2Image providers, update i18n.

<br/>

<details>
<summary><kbd>Improvements and Fixes</kbd></summary>

#### Code refactoring

* **misc**: Clean mcp sitemap, closes [#8596](#8596) ([b9e3e66](b9e3e66))
* **misc**: Refactor jose-JWT to xor obfuscation, closes [#8595](#8595) ([be98d56](be98d56))

#### Styles

* **misc**: Add more OpenAI SDK Text2Image providers, closes [#8573](#8573) ([403aebd](403aebd))
* **misc**: Update i18n, closes [#8593](#8593) ([356cf0c](356cf0c))

</details>

<div align="right">

[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)

</div>
@lobehubbot
Copy link
Member

🎉 This PR is included in version 1.105.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

github-actions bot pushed a commit to jaworldwideorg/OneJA-Bot that referenced this pull request Jul 29, 2025
### [Version&nbsp;1.104.1](v1.104.0...v1.104.1)
<sup>Released on **2025-07-29**</sup>

#### ♻ Code Refactoring

- **misc**: Clean mcp sitemap, refactor jose-JWT to xor obfuscation.

#### 💄 Styles

- **misc**: Add more OpenAI SDK Text2Image providers, support more Text2Image from Qwen, update i18n.

<br/>

<details>
<summary><kbd>Improvements and Fixes</kbd></summary>

#### Code refactoring

* **misc**: Clean mcp sitemap, closes [lobehub#8596](https://github.com/jaworldwideorg/OneJA-Bot/issues/8596) ([b9e3e66](b9e3e66))
* **misc**: Refactor jose-JWT to xor obfuscation, closes [lobehub#8595](https://github.com/jaworldwideorg/OneJA-Bot/issues/8595) ([be98d56](be98d56))

#### Styles

* **misc**: Add more OpenAI SDK Text2Image providers, closes [lobehub#8573](https://github.com/jaworldwideorg/OneJA-Bot/issues/8573) ([403aebd](403aebd))
* **misc**: Support more Text2Image from Qwen, closes [lobehub#8574](https://github.com/jaworldwideorg/OneJA-Bot/issues/8574) ([b8c0e2d](b8c0e2d))
* **misc**: Update i18n, closes [lobehub#8593](https://github.com/jaworldwideorg/OneJA-Bot/issues/8593) ([356cf0c](356cf0c))

</details>

<div align="right">

[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)

</div>
bbbugg pushed a commit to bbbugg/lobe-chat that referenced this pull request Aug 14, 2025
bbbugg pushed a commit to bbbugg/lobe-chat that referenced this pull request Aug 14, 2025
### [Version&nbsp;1.105.2](lobehub/lobe-chat@v1.105.1...v1.105.2)
<sup>Released on **2025-07-29**</sup>

#### ♻ Code Refactoring

- **misc**: Clean mcp sitemap, refactor jose-JWT to xor obfuscation.

#### 💄 Styles

- **misc**: Add more OpenAI SDK Text2Image providers, update i18n.

<br/>

<details>
<summary><kbd>Improvements and Fixes</kbd></summary>

#### Code refactoring

* **misc**: Clean mcp sitemap, closes [lobehub#8596](lobehub#8596) ([9715349](lobehub@9715349))
* **misc**: Refactor jose-JWT to xor obfuscation, closes [lobehub#8595](lobehub#8595) ([06b7164](lobehub@06b7164))

#### Styles

* **misc**: Add more OpenAI SDK Text2Image providers, closes [lobehub#8573](lobehub#8573) ([221488e](lobehub@221488e))
* **misc**: Update i18n, closes [lobehub#8593](lobehub#8593) ([89d4059](lobehub@89d4059))

</details>

<div align="right">

[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)

</div>
cy948 pushed a commit to cy948/lobe-chat that referenced this pull request Aug 23, 2025
cy948 pushed a commit to cy948/lobe-chat that referenced this pull request Aug 23, 2025
### [Version&nbsp;1.105.2](lobehub/lobe-chat@v1.105.1...v1.105.2)
<sup>Released on **2025-07-29**</sup>

#### ♻ Code Refactoring

- **misc**: Clean mcp sitemap, refactor jose-JWT to xor obfuscation.

#### 💄 Styles

- **misc**: Add more OpenAI SDK Text2Image providers, update i18n.

<br/>

<details>
<summary><kbd>Improvements and Fixes</kbd></summary>

#### Code refactoring

* **misc**: Clean mcp sitemap, closes [lobehub#8596](lobehub#8596) ([b9e3e66](lobehub@b9e3e66))
* **misc**: Refactor jose-JWT to xor obfuscation, closes [lobehub#8595](lobehub#8595) ([be98d56](lobehub@be98d56))

#### Styles

* **misc**: Add more OpenAI SDK Text2Image providers, closes [lobehub#8573](lobehub#8573) ([403aebd](lobehub@403aebd))
* **misc**: Update i18n, closes [lobehub#8593](lobehub#8593) ([356cf0c](lobehub@356cf0c))

</details>

<div align="right">

[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)

</div>
@dosubot dosubot bot mentioned this pull request Aug 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants