@guanmu/ccprofile 0.1.13 → 0.1.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +20 -14
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -239,10 +239,28 @@ async function addPlugin(profileName, plugin) {
|
|
|
239
239
|
p.log.warn("All available plugins already added.");
|
|
240
240
|
return;
|
|
241
241
|
}
|
|
242
|
+
let filtered = available;
|
|
243
|
+
if (available.length > 10) {
|
|
244
|
+
const query = (await p.text({
|
|
245
|
+
message: `Search plugins (leave empty to list all):`,
|
|
246
|
+
}));
|
|
247
|
+
if (p.isCancel(query))
|
|
248
|
+
return;
|
|
249
|
+
const q = query.trim().toLowerCase();
|
|
250
|
+
if (q) {
|
|
251
|
+
filtered = available.filter((pl) => pl.name.toLowerCase().includes(q) ||
|
|
252
|
+
pl.description.toLowerCase().includes(q) ||
|
|
253
|
+
(pl.category && pl.category.toLowerCase().includes(q)));
|
|
254
|
+
if (filtered.length === 0) {
|
|
255
|
+
p.log.warn(`No plugins matching "${query.trim()}".`);
|
|
256
|
+
return;
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
}
|
|
242
260
|
const selected = await p.select({
|
|
243
261
|
message: `Add plugin to "${profileName}":`,
|
|
244
262
|
options: [
|
|
245
|
-
...
|
|
263
|
+
...filtered.map((pl) => ({
|
|
246
264
|
value: pl.name,
|
|
247
265
|
label: pl.name,
|
|
248
266
|
hint: pl.description.slice(0, 60),
|
|
@@ -488,22 +506,10 @@ async function marketplaceWizard() {
|
|
|
488
506
|
await searchPlugins();
|
|
489
507
|
}
|
|
490
508
|
}
|
|
491
|
-
const CCX_LOGO = [
|
|
492
|
-
" ██████╗██████╗",
|
|
493
|
-
" ██╔════╝██╔══██╗",
|
|
494
|
-
" ██║ ██████╔╝",
|
|
495
|
-
" ██║ ██╔══██╗",
|
|
496
|
-
" ╚██████╗██║ ██║",
|
|
497
|
-
" ╚═════╝╚═╝ ╚═╝",
|
|
498
|
-
];
|
|
499
509
|
function printBanner() {
|
|
500
510
|
const require = createRequire(import.meta.url);
|
|
501
511
|
const pkg = require("../package.json");
|
|
502
|
-
|
|
503
|
-
CCX_LOGO.forEach((line) => console.log(pc.bold(pc.magenta(line))));
|
|
504
|
-
console.log();
|
|
505
|
-
console.log(pc.dim(" ") + pc.italic(pc.white("Agent Profile Manager")) + pc.dim(" ") + pc.gray(`v${pkg.version}`));
|
|
506
|
-
console.log();
|
|
512
|
+
p.note(pc.bold("ccx") + pc.dim(" — Agent Profile Manager ") + pc.gray(`v${pkg.version}`));
|
|
507
513
|
}
|
|
508
514
|
async function interactiveMode() {
|
|
509
515
|
if (!canPrompt()) {
|