refactor: add self-update preset skills#165
Conversation
|
ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (10)
✅ Files skipped from review due to trivial changes (2)
🚧 Files skipped from review as they are similar to previous changes (1)
Summary by CodeRabbit
WalkthroughThe PR makes the post-install/post-update self-update flow invoke the managed executable's "skills add" and extends skills installation to best-effort install preset registry packages when no packageName is given. It updates installRegistrySkills to return ManagedSkillInstallSummary[] and accept recordTelemetry/writeOutput flags (gating telemetry and user-facing output), adds presetSkillPackageNames and installPresetSkillPackages, replaces the previous bundled-refresh export with attemptManagedSkillInstall, updates callsites (self-update core and update), updates tests to expect the managed-skill invocation, and updates English/Chinese docs. Sequence Diagram(s)sequenceDiagram
participant CLI
participant SelfUpdate
participant ManagedExe
participant Registry
CLI->>SelfUpdate: performSelfUpdateOperation()
SelfUpdate->>ManagedExe: resolveManagedSkillInstallCommandPath(...)
SelfUpdate->>ManagedExe: run ["skills","add"] (attemptManagedSkillInstall)
ManagedExe->>Registry: fetch preset package metadata (if any)
Registry-->>ManagedExe: package tarball / skill info
ManagedExe-->>SelfUpdate: ManagedSkillInstallSummary[]
SelfUpdate-->>CLI: completion message (includes preset-installed skill names)
Possibly related PRs
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches✨ Simplify code
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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 `@src/application/commands/self-update.cli.test.ts`:
- Around line 1047-1068: Extract the createExpectedManagedSkillInstallCommands
helper into the shared test helpers module (__tests__/helpers.ts), modify it to
accept the full preset list (or import presetSkillPackageNames) and generate the
second expected command by iterating over the full presetSkillPackageNames array
(not using presetSkillPackageNames[0]) to produce entries for each preset
package, and update both test files to import and call this shared helper so the
expected commands are generated dynamically from the current presets.
🪄 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: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 8b9bfb92-c511-4e82-8f28-1534a91e9515
📒 Files selected for processing (7)
docs/commands.mddocs/commands.zh-CN.mdsrc/application/commands/self-update.cli.test.tssrc/application/commands/update.tssrc/application/self-update/bundled-skills.tssrc/application/self-update/core.test.tssrc/application/self-update/core.ts
Need help on this PR? Tag
@codesmithwith what you need.