Skip to content

feat: ✨ 引入 vitepress-plugin-llms 优化 AI 理解 - #1034

Merged
Moonofweisheng merged 1 commit into
masterfrom
feat/vitepress-plugin-llms
May 6, 2025
Merged

feat: ✨ 引入 vitepress-plugin-llms 优化 AI 理解#1034
Moonofweisheng merged 1 commit into
masterfrom
feat/vitepress-plugin-llms

Conversation

@Moonofweisheng

@Moonofweisheng Moonofweisheng commented May 6, 2025

Copy link
Copy Markdown
Owner

🤔 这个 PR 的性质是?(至少选择一个)

  • 日常 bug 修复
  • 新特性提交
  • 站点、文档改进
  • 演示代码改进
  • 组件样式/交互改进
  • TypeScript 定义更新
  • CI/CD 改进
  • 包体积优化
  • 性能优化
  • 功能增强
  • 国际化改进
  • 代码重构
  • 代码风格优化
  • 测试用例
  • 分支合并
  • 其他改动(是关于什么的改动?)

🔗 相关 Issue

💡 需求背景和解决方案

引入 vitepress-plugin-llms 优化 AI 理解

☑️ 请求合并前的自查清单

⚠️ 请自检并全部勾选全部选项⚠️

  • 文档已补充或无须补充
  • 代码演示已提供或无须提供
  • TypeScript 定义已补充或无须补充

Summary by CodeRabbit

  • 新功能

    • 文档站点集成了新的 Vitepress 插件,并新增了 URL 重定向规则,优化了文档访问体验。
  • 样式

    • 统一了文档配置文件中的格式和空格,提升了可读性。
  • 杂项

    • 更新了依赖项,增加了 Vitepress 插件并调整了相关依赖版本。
    • 移除了全局组件 ConditionalTest 的声明。

@vercel

vercel Bot commented May 6, 2025

Copy link
Copy Markdown

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

Name Status Preview Comments Updated (UTC)
wot-design-uni ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 6, 2025 7:31am

@coderabbitai

coderabbitai Bot commented May 6, 2025

Copy link
Copy Markdown

Walkthrough

本次变更主要包括:移除全局 Vue 组件 ConditionalTest 的类型声明,Vitepress 配置文件集成了 vitepress-plugin-llms 插件并修正了格式,新增了文档重定向规则文件 _redirects,以及调整了 package.json 依赖项,更新了 Vitepress 及其相关插件的版本。

Changes

文件或文件组 变更摘要
components.d.ts 移除了全局组件 ConditionalTest 的类型声明。
docs/.vitepress/config.mts 集成 vitepress-plugin-llms 插件,修正了格式和逗号,更新了注释。
docs/public/_redirects 新增 URL 重定向规则,实现 .md.txt 文档请求的重定向。
package.json 添加/更新了 Vitepress 及其插件依赖,调整了 Vite 版本号。

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Vitepress
    participant vitepress-plugin-llms

    User->>Vitepress: 请求文档页面
    Vitepress->>vitepress-plugin-llms: 处理插件逻辑(忽略部分 md 文件等)
    Vitepress-->>User: 返回渲染后的页面
Loading
sequenceDiagram
    participant Browser
    participant StaticServer

    Browser->>StaticServer: 请求 /llms-full.md 或 /llms-full.txt
    StaticServer-->>Browser: 200 重定向到 /llms-full.txt

    Browser->>StaticServer: 请求 /llms.md 或 /llms.txt
    StaticServer-->>Browser: 200 重定向到 /llms.txt
Loading

Poem

兔子在代码间跳跃忙,
组件声明悄然藏,
插件新加格式亮,
文档路径巧重定,
依赖更新随风扬。
代码世界春意浓,
变化如诗共欣赏!

((\
( -.-)
o_(")(")

✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@netlify

netlify Bot commented May 6, 2025

Copy link
Copy Markdown

Deploy Preview for wot-design-uni ready!

Name Link
🔨 Latest commit 47fc677
🔍 Latest deploy log https://app.netlify.com/sites/wot-design-uni/deploys/6819b9dc13b48400084f2eed
😎 Deploy Preview https://deploy-preview-1034--wot-design-uni.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@codecov-commenter

codecov-commenter commented May 6, 2025

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.79%. Comparing base (7e84c5c) to head (47fc677).
Report is 1 commits behind head on master.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1034      +/-   ##
==========================================
+ Coverage   84.70%   84.79%   +0.09%     
==========================================
  Files         215      215              
  Lines       17269    17277       +8     
  Branches     2767     2655     -112     
==========================================
+ Hits        14627    14650      +23     
+ Misses       2642     2627      -15     
Flag Coverage Δ
h5 84.79% <ø> (+0.09%) ⬆️
wd-action-sheet 90.26% <ø> (ø)
wd-backtop 77.12% <ø> (ø)
wd-badge 100.00% <ø> (ø)
wd-button 96.63% <ø> (ø)
wd-calendar 76.79% <ø> (+0.06%) ⬆️
wd-calendar-view 65.06% <ø> (+0.09%) ⬆️
wd-card 100.00% <ø> (ø)
wd-cell 88.63% <ø> (+0.26%) ⬆️
wd-cell-group 91.89% <ø> (+0.12%) ⬆️
wd-checkbox 80.99% <ø> (+0.07%) ⬆️
wd-checkbox-group 88.83% <ø> (+0.02%) ⬆️
wd-circle 95.65% <ø> (ø)
wd-col-picker 79.75% <ø> (+0.10%) ⬆️
wd-collapse 89.20% <ø> (+0.05%) ⬆️
wd-config-provider 70.31% <ø> (ø)
wd-count-down 94.50% <ø> (+0.08%) ⬆️
wd-count-to 83.93% <ø> (+0.13%) ⬆️
wd-curtain 78.57% <ø> (ø)
wd-datetime-picker 72.80% <ø> (+0.09%) ⬆️
wd-datetime-picker-view 72.36% <ø> (+0.03%) ⬆️
wd-divider 100.00% <ø> (ø)
wd-drop-menu 85.55% <ø> (+0.02%) ⬆️
wd-fab 58.49% <ø> (+0.05%) ⬆️
wd-floating-panel 70.32% <ø> (ø)
wd-form 79.17% <ø> (+0.03%) ⬆️
wd-gap 100.00% <ø> (ø)
wd-grid 82.12% <ø> (+0.67%) ⬆️
wd-grid-item 80.79% <ø> (+0.06%) ⬆️
wd-icon 100.00% <ø> (ø)
wd-img 100.00% <ø> (ø)
wd-img-cropper 85.48% <ø> (+0.02%) ⬆️
wd-index-anchor 80.32% <ø> (ø)
wd-index-bar 93.10% <ø> (ø)
wd-input 92.42% <ø> (+0.10%) ⬆️
wd-input-number 74.48% <ø> (ø)
wd-keyboard 89.73% <ø> (ø)
wd-layout 92.22% <ø> (+0.04%) ⬆️
wd-loading 100.00% <ø> (ø)
wd-loadmore 94.84% <ø> (+0.02%) ⬆️
wd-message-box 83.55% <ø> (+0.11%) ⬆️
wd-navbar 85.61% <ø> (ø)
wd-navbar-capsule 81.69% <ø> (ø)
wd-notice-bar 72.99% <ø> (ø)
wd-notify 83.19% <ø> (+0.04%) ⬆️
wd-number-keyboard 84.68% <ø> (ø)
wd-overlay 88.73% <ø> (ø)
wd-pagination 81.56% <ø> (+0.05%) ⬆️
wd-password-input 97.72% <ø> (ø)
wd-picker 81.40% <ø> (+0.09%) ⬆️
wd-picker-view 66.84% <ø> (+0.09%) ⬆️
wd-popover 73.88% <ø> (+0.04%) ⬆️
wd-popup 83.91% <ø> (ø)
wd-progress 61.92% <ø> (ø)
wd-radio 93.75% <ø> (+0.02%) ⬆️
wd-radio-group 91.44% <ø> (+0.02%) ⬆️
wd-rate 89.28% <ø> (ø)
wd-resize 79.83% <ø> (ø)
wd-search 72.17% <ø> (+0.12%) ⬆️
wd-segmented 96.52% <ø> (ø)
wd-select-picker 75.91% <ø> (+0.08%) ⬆️
wd-sidebar 59.37% <ø> (+0.31%) ⬆️
wd-signature 58.62% <ø> (+0.05%) ⬆️
wd-skeleton 98.14% <ø> (ø)
wd-slider 71.80% <ø> (ø)
wd-sort-button 84.54% <ø> (ø)
wd-status-tip 81.81% <ø> (ø)
wd-step 94.68% <ø> (+0.03%) ⬆️
wd-steps 86.25% <ø> (+0.08%) ⬆️
wd-sticky 81.07% <ø> (ø)
wd-sticky-box 53.66% <ø> (ø)
wd-swipe-action 53.64% <ø> (ø)
wd-swiper 66.44% <ø> (ø)
wd-swiper-nav 100.00% <ø> (ø)
wd-switch 100.00% <ø> (ø)
wd-tabbar 89.21% <ø> (+0.02%) ⬆️
wd-table 90.76% <ø> (+0.01%) ⬆️
wd-tabs ?
wd-tag 85.78% <ø> (+0.07%) ⬆️
wd-text 100.00% <ø> (ø)
wd-textarea 81.53% <ø> (+0.24%) ⬆️
wd-toast 84.61% <ø> (+0.02%) ⬆️
wd-tooltip 74.71% <ø> (+0.04%) ⬆️
wd-transition 80.97% <ø> (ø)
wd-upload 52.07% <ø> (+1.00%) ⬆️
wd-video-preview 93.23% <ø> (ø)
wd-watermark 64.64% <ø> (ø)

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.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying wot-design-uni with  Cloudflare Pages  Cloudflare Pages

Latest commit: 47fc677
Status: ✅  Deploy successful!
Preview URL: https://9e7cbfcb.wot-design-uni.pages.dev
Branch Preview URL: https://feat-vitepress-plugin-llms.wot-design-uni.pages.dev

View logs

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (4)
package.json (1)

149-153: 优化 Vite 和插件版本声明

  • "vite": "5" 过于宽松,建议使用 ^5.x.x 或指定到次要版本(如 ^5.2.8)以减少未来大版本变动带来的风险。
  • vitepress-plugin-llms 放在 devDependencies 是合理的,但请确认文档部署环境是否需在生产依赖中提供此插件。
docs/public/_redirects (1)

1-4: 确认静态重定向规则生效
新增 Netlify 风格的 _redirects,用于将 /llms-full.md/llms.md 等访问指向 .txt 文件。请在部署平台(如 Netlify 或 Vercel)验证该文件是否被正确拷贝并生效。

建议在文件末尾保留单个空行以符合常见 POSIX 结尾换行约定。

docs/.vitepress/config.mts (2)

13-15: 增强插件导入命名可读性
import llmstxt from 'vitepress-plugin-llms' 的变量名可考虑更具描述性,如 llmsPluginllmsTxtPlugin,以便代码阅读者快速理解其用途。


86-91: 为脚本标签添加属性以优化加载和安全
当前多个 <script> 标签均未指定 asyncdefer,会阻塞页面渲染。建议添加 deferasync,并考虑增加 integritycrossorigin 属性,以提升安全性。

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 588baeb and 47fc677.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (4)
  • components.d.ts (0 hunks)
  • docs/.vitepress/config.mts (6 hunks)
  • docs/public/_redirects (1 hunks)
  • package.json (2 hunks)
💤 Files with no reviewable changes (1)
  • components.d.ts
⏰ Context from checks skipped due to timeout of 90000ms (23)
  • GitHub Check: Test Components (wd-progress)
  • GitHub Check: Test Components (wd-gap)
  • GitHub Check: Test Components (wd-radio)
  • GitHub Check: Test Components (wd-password-input)
  • GitHub Check: Test Components (wd-collapse)
  • GitHub Check: Test Components (wd-overlay)
  • GitHub Check: Test Components (wd-table)
  • GitHub Check: Test Components (wd-calendar)
  • GitHub Check: Test Components (wd-datetime-picker)
  • GitHub Check: Test Components (wd-checkbox)
  • GitHub Check: Test Components (wd-calendar-view)
  • GitHub Check: Test Components (wd-divider)
  • GitHub Check: Test Components (wd-index-bar)
  • GitHub Check: Test Components (wd-popover)
  • GitHub Check: Test Components (wd-select-picker)
  • GitHub Check: Test Components (wd-config-provider)
  • GitHub Check: Test Components (wd-grid)
  • GitHub Check: Test Components (wd-curtain)
  • GitHub Check: Test Components (wd-action-sheet)
  • GitHub Check: Redirect rules - wot-design-uni
  • GitHub Check: Header rules - wot-design-uni
  • GitHub Check: Pages changed - wot-design-uni
  • GitHub Check: Cloudflare Pages
🔇 Additional comments (4)
package.json (1)

88-93: 验证 VitePress 版本兼容性
已将 vitepress 升级到 "^1.6.3",请确认此版本与现有插件(包括 vitepress-plugin-llms、其他主题或脚本)兼容,避免因版本不匹配导致构建或运行时错误。

docs/.vitepress/config.mts (3)

20-23: 校验插件配置项
ignoreFiles 列表应与 docs 目录结构完全匹配。请确认通配符模式(如 ads/*reward/*)能正确过滤目标文件,必要时可使用更细粒度的模式(如 guide/**/*.md)。


158-162: 导航栏更新确认
已在导航中添加 ⭐ 案例 项目,并保持与 guide/cases 路径一致,符合文档需求。


224-230: 侧边栏同步新增条目
侧边栏中同步加入 ⭐ 案例加群沟通 链接,保证导航与侧边栏保持一致,提升用户体验。

Comment on lines +4 to 9
* @LastEditTime: 2025-05-06 15:18:36
* @LastEditors: weisheng
* @Description:
* @Description:
* @FilePath: /wot-design-uni/docs/.vitepress/config.mts
* 记得注释
*/

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

补充文件头注释并移除占位
@Description 字段为空,且保留了 记得注释 提示,建议填写本配置文件的简要说明,并移除无效的占位注释,以提升可维护性。

@github-actions

github-actions Bot commented May 6, 2025

Copy link
Copy Markdown

组件测试摘要 (H5 平台)

测试时间: Tue May 6 07:31:59 UTC 2025

测试结果

组件 状态 覆盖率
wd-action-sheet ✅ 通过 90.04%
wd-backtop ✅ 通过 77.12%
wd-badge ✅ 通过 100%
wd-button ✅ 通过 96.63%
wd-calendar ✅ 通过 76.77%
wd-calendar-view ✅ 通过 65.06%
wd-card ✅ 通过 100%
wd-cell ✅ 通过 88.63%
wd-cell-group ✅ 通过 91.89%
wd-checkbox ✅ 通过 80.99%
wd-checkbox-group ✅ 通过 88.83%
wd-circle ✅ 通过 95.65%
wd-col-picker ✅ 通过 79.65%
wd-collapse ✅ 通过 89.2%
wd-config-provider ✅ 通过 70.31%
wd-count-down ✅ 通过 94.5%
wd-count-to ✅ 通过 83.93%
wd-curtain ✅ 通过 78.29%
wd-datetime-picker ✅ 通过 72.56%
wd-datetime-picker-view ✅ 通过 72.36%
wd-divider ✅ 通过 100%
wd-drop-menu ✅ 通过 85.4%
wd-fab ✅ 通过 58.49%
wd-floating-panel ✅ 通过 70.32%
wd-form ✅ 通过 79.15%
wd-gap ✅ 通过 100%
wd-grid ✅ 通过 81.91%
wd-grid-item ✅ 通过 80.79%
wd-icon ✅ 通过 100%
wd-img ✅ 通过 100%
wd-img-cropper ✅ 通过 85.48%
wd-index-anchor ✅ 通过 80.32%
wd-index-bar ✅ 通过 93.1%
wd-input ✅ 通过 92.42%
wd-input-number ✅ 通过 73.8%
wd-keyboard ✅ 通过 89.58%
wd-layout ✅ 通过 92.22%
wd-loading ✅ 通过 100%
wd-loadmore ✅ 通过 94.84%
wd-message-box ✅ 通过 83.46%
wd-navbar ✅ 通过 85.61%
wd-navbar-capsule ✅ 通过 81.69%
wd-notice-bar ✅ 通过 72.99%
wd-notify ✅ 通过 83.19%
wd-number-keyboard ✅ 通过 84.5%
wd-overlay ✅ 通过 87.32%
wd-pagination ✅ 通过 81.56%
wd-password-input ✅ 通过 97.72%
wd-picker ✅ 通过 81.32%
wd-picker-view ✅ 通过 66.57%
wd-popover ✅ 通过 73.88%
wd-popup ✅ 通过 83.47%
wd-progress ✅ 通过 61.42%
wd-radio ✅ 通过 93.75%
wd-radio-group ✅ 通过 91.44%
wd-rate ✅ 通过 89.28%
wd-resize ✅ 通过 79.83%
wd-search ✅ 通过 72.17%
wd-segmented ✅ 通过 96.52%
wd-select-picker ✅ 通过 75.91%
wd-sidebar ✅ 通过 59.37%
wd-signature ✅ 通过 58.62%
wd-skeleton ✅ 通过 98.14%
wd-slider ✅ 通过 71.8%
wd-sort-button ✅ 通过 84.54%
wd-status-tip ✅ 通过 81.81%
wd-step ✅ 通过 94.37%
wd-steps ✅ 通过 86.25%
wd-sticky ✅ 通过 81.07%
wd-sticky-box ✅ 通过 53.66%
wd-swipe-action ✅ 通过 53.31%
wd-swiper ✅ 通过 66.44%
wd-swiper-nav ✅ 通过 100%
wd-switch ✅ 通过 100%
wd-tabbar ✅ 通过 88.94%
wd-table ✅ 通过 90.58%
wd-tag ✅ 通过 85.78%
wd-text ✅ 通过 100%
wd-textarea ✅ 通过 81.53%
wd-toast ✅ 通过 84.46%
wd-tooltip ✅ 通过 74.71%
wd-transition ✅ 通过 80.97%
wd-upload ✅ 通过 52.07%
wd-video-preview ✅ 通过 93.23%
wd-watermark ✅ 通过 64.64%

@Moonofweisheng
Moonofweisheng merged commit 901c754 into master May 6, 2025
@Moonofweisheng
Moonofweisheng deleted the feat/vitepress-plugin-llms branch May 6, 2025 07:33
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