feat(kit): add vue skill plugin exports - #373
Conversation
…kill-storage-foundation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
💤 Files with no reviewable changes (1)
🚧 Files skipped from review as they are similar to previous changes (1)
WalkthroughChangesSkills plugin API
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant Client
participant useMessage
participant skillPlugin
participant ResponseProvider
Client->>useMessage: sendMessage
useMessage->>skillPlugin: resolve reactive selection and instructions
skillPlugin->>useMessage: provide skill tools and resolved data
useMessage->>ResponseProvider: send request with skill instructions
Possibly related PRs
Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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 |
📦 Package Previewpnpm add https://pkg.pr.new/@opentiny/tiny-robot@431b8ab pnpm add https://pkg.pr.new/@opentiny/tiny-robot-kit@431b8ab pnpm add https://pkg.pr.new/@opentiny/tiny-robot-svgs@431b8ab commit: 431b8ab |
…bot into codex/skill-vue-plugin
…codex/skill-vue-plugin
…bot into codex/skill-vue-plugin
…instruction handling
…bot into codex/skill-vue-plugin
…ructionsResolved for skill instruction handling
…emove request body modification
…bot into codex/skill-vue-plugin
…t body modification and adjust context handling
…ith new utility functions and type definitions
…tiny-robot into codex/skill-vue-plugin
…bot into codex/skill-vue-plugin
…tion and enhance type definitions
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (2)
packages/kit/src/index.ts (1)
9-17: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueRemove redundant explicit exports.
Since
export * from './skills'is now included (line 4) andpackages/kit/src/skills/index.tsalready exports these types and functions, these explicit exports are redundant and can be removed.♻️ Proposed refactor
-export { loadSkill, loadSkillWithDetails } from './skills/loader' -export type { - BrowserSkillLoadOptions, - GithubSkillLoadOptions, - SkillLoadJob, - SkillLoadOptions, - SkillLoadResult, -} from './skills/loader' -export type { SkillCandidate, SkillDefinition } from './skills/types'🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/kit/src/index.ts` around lines 9 - 17, Remove the redundant explicit value and type exports from packages/kit/src/index.ts, including loadSkill, loadSkillWithDetails, the skill loading types, and SkillCandidate/SkillDefinition. Keep the existing export * from './skills' as the sole export path for these symbols.packages/kit/src/vue/message/useMessage.test.ts (1)
266-302: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winMutate the refs after creating the engine.
These tests do not currently verify reactivity; they only verify initial ref unwrapping. Change
skillNames.valueandpreferredSkillNames.valueafteruseMessage(...)but beforesendMessage(...), then assert the updated values are used. This catches implementations that snapshot configuration during plugin construction.Also applies to: 340-379
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/kit/src/vue/message/useMessage.test.ts` around lines 266 - 302, Update the reactive skill plugin tests around the existing useMessage cases, including the corresponding preferredSkillNames case, to mutate the refs’ .value after creating the engine and before sendMessage. Assert that the request uses the updated skill names rather than the initial values, preserving the existing request assertions and proving configuration is not snapshotted during skillPlugin construction.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/kit/src/vue/message/plugins/skillPlugin.ts`:
- Around line 171-176: Update the resolver assignments in the skill plugin’s
plugin construction so fallback getSkillCandidates and getSkillByName functions
are installed only when skills is configured. When skills is absent and no
explicit resolver is provided, leave each resolver undefined so the core
plugin’s required-resolver validation reports invalid manual or auto
configurations; preserve the existing explicit resolver and skills-backed
behavior.
---
Nitpick comments:
In `@packages/kit/src/index.ts`:
- Around line 9-17: Remove the redundant explicit value and type exports from
packages/kit/src/index.ts, including loadSkill, loadSkillWithDetails, the skill
loading types, and SkillCandidate/SkillDefinition. Keep the existing export *
from './skills' as the sole export path for these symbols.
In `@packages/kit/src/vue/message/useMessage.test.ts`:
- Around line 266-302: Update the reactive skill plugin tests around the
existing useMessage cases, including the corresponding preferredSkillNames case,
to mutate the refs’ .value after creating the engine and before sendMessage.
Assert that the request uses the updated skill names rather than the initial
values, preserving the existing request assertions and proving configuration is
not snapshotted during skillPlugin construction.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 6ffe3d6a-baad-49fc-a272-fde625a28329
📒 Files selected for processing (8)
packages/kit/src/core.tspackages/kit/src/index.tspackages/kit/src/message/plugins/skillPlugin.tspackages/kit/src/skills/index.tspackages/kit/src/skills/test/skillPlugin.test.tspackages/kit/src/vue/message/plugins/index.tspackages/kit/src/vue/message/plugins/skillPlugin.tspackages/kit/src/vue/message/useMessage.test.ts
🧹 Preview Cleaned UpThe preview deployment has been removed. |

Summary by CodeRabbit