mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-07 18:26:17 +00:00
feat: async skills install (#172)
## What
Added progress reporting to the skills installation process by converting synchronous operations to asynchronous ones and implementing progress callbacks.
## Why
The skills installation process can take a significant amount of time, especially when cloning repositories or running npm operations. Users need feedback about what's happening during the installation to understand progress and know the system hasn't frozen.
## How
- Converted `execFileSync` calls to a new `execFileAsync` function using promises
- Made all installation functions (`runSkillsAdd`, `gitClone`, `fetchRepo`, `fallbackInstall`) asynchronous
- Added an optional `onProgress` callback parameter to `installAllSkills` that accepts progress messages
- Integrated progress reporting in the `init` command by passing spinner message updates to the progress callback
- Added progress messages for key installation steps like "Installing {source} skills..." and "Cloning skill repositories..."
- Added "giget" to the external dependencies list in the build configuration
## Test plan
- [ ] Unit tests added/updated
- [ ] Manual testing performed
- [ ] Documentation updated (if applicable)
This commit is contained in:
@@ -59,7 +59,9 @@ async function installSkills(interactive: boolean): Promise<void> {
|
||||
const spin = interactive ? clack.spinner() : null;
|
||||
spin?.start("Installing AI coding skills...");
|
||||
|
||||
const result = await installAllSkills(selectedTargets);
|
||||
const result = await installAllSkills(selectedTargets, {
|
||||
onProgress: (msg) => spin?.message(msg),
|
||||
});
|
||||
if (result.count > 0) {
|
||||
const msg = `${result.count} skills installed (${result.targets.join(", ")})`;
|
||||
if (spin) {
|
||||
|
||||
Reference in New Issue
Block a user