- Updated MarketplaceDrawer to include security notes and manual installation hints. - Refactored SkillDetailDrawer to display default icons for skills. - Simplified SkillListItem to use default icons for better readability. - Integrated gateway status checks and warnings in SkillsPage for improved user awareness. - Enhanced error handling for skill installation and fetching, providing clearer feedback to users. - Added new translations for error messages and gateway warnings to improve localization support.
31 lines
973 B
JavaScript
31 lines
973 B
JavaScript
#!/usr/bin/env zx
|
|
|
|
import 'zx/globals';
|
|
import { existsSync } from 'node:fs';
|
|
import { dirname, join } from 'node:path';
|
|
import { fileURLToPath } from 'node:url';
|
|
|
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
const ROOT = join(__dirname, '..');
|
|
const lockPath = join(ROOT, 'build', 'preinstalled-skills', '.preinstalled-lock.json');
|
|
const bundleScript = join(ROOT, 'scripts', 'bundle-preinstalled-skills.mjs');
|
|
|
|
if (process.env.ZN_AI_SKIP_PREINSTALLED_SKILLS_PREPARE === '1') {
|
|
echo`Skipping preinstalled skills prepare (ZN_AI_SKIP_PREINSTALLED_SKILLS_PREPARE=1).`;
|
|
process.exit(0);
|
|
}
|
|
|
|
if (existsSync(lockPath)) {
|
|
echo`Preinstalled skills bundle already exists, skipping prepare.`;
|
|
process.exit(0);
|
|
}
|
|
|
|
echo`Preinstalled skills bundle missing, preparing for dev startup...`;
|
|
|
|
try {
|
|
await $`zx ${bundleScript}`;
|
|
} catch (error) {
|
|
echo`Warning: failed to prepare preinstalled skills for dev startup: ${error?.message || error}`;
|
|
process.exit(0);
|
|
}
|