Conversation
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. WalkthroughThese changes add the gray-matter-browser dependency to parse YAML front matter from content and refactor the SDK's skill utilities to use it instead of regex-based extraction. Additionally, minor formatting improvements are applied to a documentation file and a composable function. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Fix all issues with AI agents
In `@packages/next-sdk/package.json`:
- Around line 52-53: The package.json entry incorrectly names the dependency
"grey-matter-browser" (British spelling) while the code imports
"gray-matter-browser" in packages/next-sdk/skills/index.ts; update the
dependency name in package.json to "gray-matter-browser" so it matches the
import and the actual npm package, then run install to verify the module
resolves.
In `@packages/next-sdk/skills/index.ts`:
- Around line 27-32: parseSkillFrontMatter currently returns
matter(content).data which can be an empty object (truthy) so callers like
getSkillOverviews won't skip it; change parseSkillFrontMatter to validate that
data.name and data.description exist and are strings (and not empty) and return
null otherwise, ensuring the function only returns { name: string; description:
string } when both fields are present; update the function's runtime checks to
coerce/validate types from matter(content).data (e.g., check typeof data.name
=== 'string' && data.name.trim() !== ''), and keep returning null for
missing/invalid frontmatter so downstream logic (getSkillOverviews) behaves
correctly.
🧹 Nitpick comments (1)
packages/next-sdk/skills/index.ts (1)
24-26: Stale comment: still references regex extraction, but implementation now usesgray-matter-browser.-/** - * 从主 SKILL.md 的 YAML front matter 中用正则提取 name、description - */ +/** + * 从主 SKILL.md 的 YAML front matter 中提取 name、description + */
Pull Request (OpenTiny NEXT-SDKs)
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue Number: N/A
What is the new behavior?
Does this PR introduce a breaking change?
Other information
Summary by CodeRabbit
Documentation
Improvements