Skip to content

feat(kit): add vue skill plugin exports - #373

Merged
SonyLeo merged 36 commits into
opentiny:developfrom
gene9831:codex/skill-vue-plugin
Jul 16, 2026
Merged

feat(kit): add vue skill plugin exports#373
SonyLeo merged 36 commits into
opentiny:developfrom
gene9831:codex/skill-vue-plugin

Conversation

@gene9831

@gene9831 gene9831 commented Jul 1, 2026

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • New Features
    • Added a Vue-facing skill-based message plugin supporting reactive configuration and reactive skill selection (static or async).
    • Improved “skill” tooling by exposing expanded skill loading/storage, utilities, and related exports to consumers.
  • Bug Fixes
    • Prevented automatic skill mode from running when required tool integration isn’t enabled.
  • Tests
    • Expanded adapter and plugin test coverage for reactive inputs, instruction injection behavior, and validation/error scenarios.
  • Chores
    • Added a CI step to run the kit package test suite during PR builds.

@coderabbitai

coderabbitai Bot commented Jul 1, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: de31bd1c-32a8-46be-9fdb-0111babd642c

📥 Commits

Reviewing files that changed from the base of the PR and between 10b31fa and 431b8ab.

📒 Files selected for processing (4)
  • .github/workflows/pr-ci-build.yml
  • packages/kit/src/index.ts
  • packages/kit/src/vue/message/plugins/skillPlugin.ts
  • packages/kit/src/vue/message/useMessage.test.ts
💤 Files with no reviewable changes (1)
  • packages/kit/src/index.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/kit/src/vue/message/plugins/skillPlugin.ts

Walkthrough

Changes

Skills plugin API

Layer / File(s) Summary
Public skills exports
packages/kit/src/skills/index.ts, packages/kit/src/core.ts, packages/kit/src/index.ts, packages/kit/src/vue/message/plugins/index.ts
Skill loaders, storage APIs, utilities, and Vue plugin exports are exposed through package barrels.
Core selection option types
packages/kit/src/message/plugins/skillPlugin.ts, packages/kit/src/skills/test/skillPlugin.test.ts
Skill plugin options now distinguish static selections from asynchronous selection functions, with added async type coverage.
Vue skill plugin flow
packages/kit/src/vue/message/plugins/skillPlugin.ts, packages/kit/src/vue/message/useMessage.test.ts, .github/workflows/pr-ci-build.yml
The Vue wrapper resolves reactive configuration, adapts callbacks and contexts, supplies skill lookup defaults, and tests manual, auto, default, and invalid configurations; kit tests are added to PR CI.

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
Loading

Possibly related PRs

Suggested reviewers: sonyleo

Poem

I’m a rabbit with skills in my pack,
Reactive selections hop back and back.
Barrels bloom wide, async paths gleam,
Vue sends instructions into the stream.
Auto or manual, choices take flight—
Test-covered carrots, working right!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: adding Vue skill plugin exports in the kit package.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

✅ Preview build completed successfully!

Click the image above to preview.
Preview will be automatically removed when this PR is closed.

@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

gene9831 added 15 commits July 7, 2026 18:50
…ructionsResolved for skill instruction handling
…t body modification and adjust context handling
@gene9831 gene9831 changed the title [WIP]feat(kit): add vue skill plugin exports feat(kit): add vue skill plugin exports Jul 16, 2026
@gene9831
gene9831 marked this pull request as ready for review July 16, 2026 03:17

@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 (2)
packages/kit/src/index.ts (1)

9-17: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Remove redundant explicit exports.

Since export * from './skills' is now included (line 4) and packages/kit/src/skills/index.ts already 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 win

Mutate the refs after creating the engine.

These tests do not currently verify reactivity; they only verify initial ref unwrapping. Change skillNames.value and preferredSkillNames.value after useMessage(...) but before sendMessage(...), 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

📥 Commits

Reviewing files that changed from the base of the PR and between b59f1ea and 10b31fa.

📒 Files selected for processing (8)
  • packages/kit/src/core.ts
  • packages/kit/src/index.ts
  • packages/kit/src/message/plugins/skillPlugin.ts
  • packages/kit/src/skills/index.ts
  • packages/kit/src/skills/test/skillPlugin.test.ts
  • packages/kit/src/vue/message/plugins/index.ts
  • packages/kit/src/vue/message/plugins/skillPlugin.ts
  • packages/kit/src/vue/message/useMessage.test.ts

Comment thread packages/kit/src/vue/message/plugins/skillPlugin.ts Outdated
@SonyLeo
SonyLeo merged commit 814d150 into opentiny:develop Jul 16, 2026
4 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

🧹 Preview Cleaned Up

The preview deployment has been removed.

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