@spences10/pi-skills 0.0.13 → 0.0.15

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.
Files changed (43) hide show
  1. package/README.md +45 -5
  2. package/dist/commands.d.ts +1 -1
  3. package/dist/commands.js +126 -60
  4. package/dist/commands.js.map +1 -1
  5. package/dist/config.d.ts +8 -0
  6. package/dist/config.js +32 -0
  7. package/dist/config.js.map +1 -1
  8. package/dist/gh-skill.d.ts +26 -0
  9. package/dist/gh-skill.js +115 -0
  10. package/dist/gh-skill.js.map +1 -0
  11. package/dist/importer.js +1 -1
  12. package/dist/importer.js.map +1 -1
  13. package/dist/manager.d.ts +5 -1
  14. package/dist/manager.js +48 -9
  15. package/dist/manager.js.map +1 -1
  16. package/dist/scanner.d.ts +4 -1
  17. package/dist/scanner.js +73 -5
  18. package/dist/scanner.js.map +1 -1
  19. package/dist/skill-utils.d.ts +1 -4
  20. package/dist/skill-utils.js +0 -39
  21. package/dist/skill-utils.js.map +1 -1
  22. package/dist/skills-ui/github.d.ts +3 -0
  23. package/dist/skills-ui/github.js +221 -0
  24. package/dist/skills-ui/github.js.map +1 -0
  25. package/dist/skills-ui/home.d.ts +2 -0
  26. package/dist/skills-ui/home.js +41 -0
  27. package/dist/skills-ui/home.js.map +1 -0
  28. package/dist/skills-ui/importable.d.ts +3 -0
  29. package/dist/skills-ui/importable.js +91 -0
  30. package/dist/skills-ui/importable.js.map +1 -0
  31. package/dist/skills-ui/manage.d.ts +3 -0
  32. package/dist/skills-ui/manage.js +46 -0
  33. package/dist/skills-ui/manage.js.map +1 -0
  34. package/dist/skills-ui/profiles.d.ts +6 -0
  35. package/dist/skills-ui/profiles.js +165 -0
  36. package/dist/skills-ui/profiles.js.map +1 -0
  37. package/dist/skills-ui/skill-list.d.ts +10 -0
  38. package/dist/skills-ui/skill-list.js +39 -0
  39. package/dist/skills-ui/skill-list.js.map +1 -0
  40. package/dist/skills-ui.d.ts +6 -16
  41. package/dist/skills-ui.js +6 -373
  42. package/dist/skills-ui.js.map +1 -1
  43. package/package.json +6 -6
@@ -0,0 +1,165 @@
1
+ import { show_input_modal, show_picker_modal, show_text_modal, } from '@spences10/pi-tui-modal';
2
+ import { format_profile_detail, profile_description, } from '../skill-utils.js';
3
+ export async function show_refresh_summary(ctx, mgr) {
4
+ mgr.refresh();
5
+ ctx.ui.notify(`Skills refreshed: ${mgr.discover().length} managed, ${mgr.discover_importable().length} importable`, 'info');
6
+ }
7
+ export async function show_defaults_modal(ctx, mgr) {
8
+ const selected = await show_picker_modal(ctx, {
9
+ title: 'Default skill policy',
10
+ subtitle: `Active profile: ${mgr.get_active_profile()}`,
11
+ items: [
12
+ {
13
+ value: 'all-enabled',
14
+ label: 'Enable by default',
15
+ description: 'Start with matching skills enabled; exclude rules turn skills off',
16
+ },
17
+ {
18
+ value: 'all-disabled',
19
+ label: 'Disable by default',
20
+ description: 'Start with skills disabled; include rules turn skills on',
21
+ },
22
+ ],
23
+ });
24
+ if (!selected)
25
+ return;
26
+ mgr.set_defaults(selected);
27
+ await show_text_modal(ctx, {
28
+ title: 'Default skill policy updated',
29
+ text: `Active profile now starts from: ${selected}`,
30
+ });
31
+ }
32
+ export async function pick_profile(ctx, mgr, title) {
33
+ return await show_picker_modal(ctx, {
34
+ title,
35
+ subtitle: `Active: ${mgr.get_active_profile()}`,
36
+ items: mgr.list_profiles().map((profile) => ({
37
+ value: profile.name,
38
+ label: `${profile.active ? '● ' : '○ '}${profile.name}`,
39
+ description: profile_description(profile),
40
+ })),
41
+ empty_message: 'No skill profiles found',
42
+ });
43
+ }
44
+ export async function show_profiles_modal(ctx, mgr) {
45
+ while (true) {
46
+ const selected = await show_picker_modal(ctx, {
47
+ title: 'Skill profiles',
48
+ subtitle: `Active: ${mgr.get_active_profile()}`,
49
+ items: [
50
+ {
51
+ value: 'use',
52
+ label: 'Use profile',
53
+ description: 'Switch the active skill profile and reload',
54
+ },
55
+ {
56
+ value: 'create',
57
+ label: 'Create profile',
58
+ description: 'Create a named skill profile',
59
+ },
60
+ {
61
+ value: 'include',
62
+ label: 'Add include rule',
63
+ description: 'Turn on skills that match a profile pattern',
64
+ },
65
+ {
66
+ value: 'exclude',
67
+ label: 'Add exclude rule',
68
+ description: 'Turn off skills that match a profile pattern',
69
+ },
70
+ {
71
+ value: 'defaults',
72
+ label: 'Default skill policy',
73
+ description: 'Choose the profile starting point before rules apply',
74
+ },
75
+ {
76
+ value: 'show',
77
+ label: 'Show profile details',
78
+ description: 'Inspect include/exclude patterns',
79
+ },
80
+ ],
81
+ footer: 'patterns match skill names, keys, sources, or paths; * is supported',
82
+ });
83
+ if (!selected)
84
+ return false;
85
+ if (selected === 'use') {
86
+ const profile = await pick_profile(ctx, mgr, 'Use skill profile');
87
+ if (!profile)
88
+ continue;
89
+ try {
90
+ mgr.use_profile(profile);
91
+ ctx.ui.notify(`Using skill profile ${profile}. Reloading...`, 'info');
92
+ await ctx.reload();
93
+ return true;
94
+ }
95
+ catch (error) {
96
+ ctx.ui.notify(error instanceof Error ? error.message : String(error), 'warning');
97
+ }
98
+ }
99
+ else if (selected === 'create') {
100
+ const name = await show_input_modal(ctx, {
101
+ title: 'Create skill profile',
102
+ label: 'Profile name',
103
+ trim: true,
104
+ });
105
+ if (!name)
106
+ continue;
107
+ try {
108
+ mgr.create_profile(name);
109
+ await show_text_modal(ctx, {
110
+ title: 'Skill profile created',
111
+ text: `Created empty profile ${name}. Use /skills profile use ${name} to activate it, then /skills enable <skill> to add skills.`,
112
+ });
113
+ }
114
+ catch (error) {
115
+ ctx.ui.notify(error instanceof Error ? error.message : String(error), 'warning');
116
+ }
117
+ }
118
+ else if (selected === 'include' || selected === 'exclude') {
119
+ const profile = await pick_profile(ctx, mgr, selected === 'include'
120
+ ? 'Choose profile for include rule'
121
+ : 'Choose profile for exclude rule');
122
+ if (!profile)
123
+ continue;
124
+ const pattern = await show_input_modal(ctx, {
125
+ title: selected === 'include'
126
+ ? 'Add include rule'
127
+ : 'Add exclude rule',
128
+ subtitle: `Profile: ${profile}`,
129
+ label: 'Skill name, key, or pattern',
130
+ trim: true,
131
+ });
132
+ if (!pattern)
133
+ continue;
134
+ try {
135
+ if (selected === 'include')
136
+ mgr.include_in_profile(profile, pattern);
137
+ else
138
+ mgr.exclude_from_profile(profile, pattern);
139
+ ctx.ui.notify(`Updated ${profile}. Reloading...`, 'info');
140
+ await ctx.reload();
141
+ return true;
142
+ }
143
+ catch (error) {
144
+ ctx.ui.notify(error instanceof Error ? error.message : String(error), 'warning');
145
+ }
146
+ }
147
+ else if (selected === 'defaults') {
148
+ await show_defaults_modal(ctx, mgr);
149
+ }
150
+ else if (selected === 'show') {
151
+ const profile_name = await pick_profile(ctx, mgr, 'Show skill profile');
152
+ const profile = mgr
153
+ .list_profiles()
154
+ .find((p) => p.name === profile_name);
155
+ if (!profile)
156
+ continue;
157
+ await show_text_modal(ctx, {
158
+ title: profile.name,
159
+ subtitle: profile_description(profile),
160
+ text: format_profile_detail(profile),
161
+ });
162
+ }
163
+ }
164
+ }
165
+ //# sourceMappingURL=profiles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"profiles.js","sourceRoot":"","sources":["../../src/skills-ui/profiles.ts"],"names":[],"mappings":"AACA,OAAO,EACN,gBAAgB,EAChB,iBAAiB,EACjB,eAAe,GACf,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EACN,qBAAqB,EACrB,mBAAmB,GACnB,MAAM,mBAAmB,CAAC;AAE3B,MAAM,CAAC,KAAK,UAAU,oBAAoB,CACzC,GAA4B,EAC5B,GAAkB;IAElB,GAAG,CAAC,OAAO,EAAE,CAAC;IACd,GAAG,CAAC,EAAE,CAAC,MAAM,CACZ,qBAAqB,GAAG,CAAC,QAAQ,EAAE,CAAC,MAAM,aAAa,GAAG,CAAC,mBAAmB,EAAE,CAAC,MAAM,aAAa,EACpG,MAAM,CACN,CAAC;AACH,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,mBAAmB,CACxC,GAA4B,EAC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,KAAK,EAAE,OAAO,CAAC,IAAI;gBACnB,QAAQ,EAAE,mBAAmB,CAAC,OAAO,CAAC;gBACtC,IAAI,EAAE,qBAAqB,CAAC,OAAO,CAAC;aACpC,CAAC,CAAC;QACJ,CAAC;IACF,CAAC;AACF,CAAC"}
@@ -0,0 +1,10 @@
1
+ import type { ExtensionCommandContext } from '@earendil-works/pi-coding-agent';
2
+ import type { ManagedSkill, SkillsManager } from '../manager.js';
3
+ export declare function pick_skill(ctx: ExtensionCommandContext, options: {
4
+ title: string;
5
+ subtitle: string;
6
+ skills: ManagedSkill[];
7
+ empty_message: string;
8
+ }): Promise<string | undefined>;
9
+ export declare function show_skill_detail_modal(ctx: ExtensionCommandContext, skill: ManagedSkill): Promise<void>;
10
+ export declare function show_skill_list_modal(ctx: ExtensionCommandContext, mgr: SkillsManager): Promise<void>;
@@ -0,0 +1,39 @@
1
+ import { show_picker_modal, show_text_modal, } from '@spences10/pi-tui-modal';
2
+ import { find_skill, format_skill_detail, skill_status, sort_skills, } from '../skill-utils.js';
3
+ export async function pick_skill(ctx, options) {
4
+ return await show_picker_modal(ctx, {
5
+ title: options.title,
6
+ subtitle: options.subtitle,
7
+ items: options.skills.map((skill) => ({
8
+ value: skill.key,
9
+ label: skill.name,
10
+ description: `${skill_status(skill)} • ${skill.source} • ${skill.key}`,
11
+ })),
12
+ empty_message: options.empty_message,
13
+ });
14
+ }
15
+ export async function show_skill_detail_modal(ctx, skill) {
16
+ await show_text_modal(ctx, {
17
+ title: skill.name,
18
+ subtitle: `${skill_status(skill)} • ${skill.source}`,
19
+ text: format_skill_detail(skill),
20
+ });
21
+ }
22
+ export async function show_skill_list_modal(ctx, mgr) {
23
+ while (true) {
24
+ const skills = sort_skills([
25
+ ...mgr.discover(),
26
+ ...mgr.discover_importable(),
27
+ ]);
28
+ const key = await pick_skill(ctx, {
29
+ title: 'Browse skills',
30
+ subtitle: `${mgr.discover().length} managed • ${mgr.discover_importable().length} importable`,
31
+ skills,
32
+ empty_message: 'No skills found',
33
+ });
34
+ if (!key)
35
+ return;
36
+ await show_skill_detail_modal(ctx, find_skill(skills, key));
37
+ }
38
+ }
39
+ //# sourceMappingURL=skill-list.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"skill-list.js","sourceRoot":"","sources":["../../src/skills-ui/skill-list.ts"],"names":[],"mappings":"AACA,OAAO,EACN,iBAAiB,EACjB,eAAe,GACf,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EACN,UAAU,EACV,mBAAmB,EACnB,YAAY,EACZ,WAAW,GACX,MAAM,mBAAmB,CAAC;AAE3B,MAAM,CAAC,KAAK,UAAU,UAAU,CAC/B,GAA4B,EAC5B,OAKC;IAED,OAAO,MAAM,iBAAiB,CAAC,GAAG,EAAE;QACnC,KAAK,EAAE,OAAO,CAAC,KAAK;QACpB,QAAQ,EAAE,OAAO,CAAC,QAAQ;QAC1B,KAAK,EAAE,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;YACrC,KAAK,EAAE,KAAK,CAAC,GAAG;YAChB,KAAK,EAAE,KAAK,CAAC,IAAI;YACjB,WAAW,EAAE,GAAG,YAAY,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC,MAAM,MAAM,KAAK,CAAC,GAAG,EAAE;SACtE,CAAC,CAAC;QACH,aAAa,EAAE,OAAO,CAAC,aAAa;KACpC,CAAC,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAC5C,GAA4B,EAC5B,KAAmB;IAEnB,MAAM,eAAe,CAAC,GAAG,EAAE;QAC1B,KAAK,EAAE,KAAK,CAAC,IAAI;QACjB,QAAQ,EAAE,GAAG,YAAY,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC,MAAM,EAAE;QACpD,IAAI,EAAE,mBAAmB,CAAC,KAAK,CAAC;KAChC,CAAC,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,qBAAqB,CAC1C,GAA4B,EAC5B,GAAkB;IAElB,OAAO,IAAI,EAAE,CAAC;QACb,MAAM,MAAM,GAAG,WAAW,CAAC;YAC1B,GAAG,GAAG,CAAC,QAAQ,EAAE;YACjB,GAAG,GAAG,CAAC,mBAAmB,EAAE;SAC5B,CAAC,CAAC;QACH,MAAM,GAAG,GAAG,MAAM,UAAU,CAAC,GAAG,EAAE;YACjC,KAAK,EAAE,eAAe;YACtB,QAAQ,EAAE,GAAG,GAAG,CAAC,QAAQ,EAAE,CAAC,MAAM,cAAc,GAAG,CAAC,mBAAmB,EAAE,CAAC,MAAM,aAAa;YAC7F,MAAM;YACN,aAAa,EAAE,iBAAiB;SAChC,CAAC,CAAC;QACH,IAAI,CAAC,GAAG;YAAE,OAAO;QACjB,MAAM,uBAAuB,CAAC,GAAG,EAAE,UAAU,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC;IAC7D,CAAC;AACF,CAAC"}
@@ -1,16 +1,6 @@
1
- import type { ExtensionCommandContext } from '@mariozechner/pi-coding-agent';
2
- import type { ManagedSkill, SkillsManager } from './manager.js';
3
- export declare function show_skills_home_modal(ctx: ExtensionCommandContext, managed_count: number, importable_count: number, active_profile: string): Promise<string | undefined>;
4
- export declare function show_skills_manager_modal(ctx: ExtensionCommandContext, mgr: SkillsManager): Promise<boolean>;
5
- export declare function pick_skill(ctx: ExtensionCommandContext, options: {
6
- title: string;
7
- subtitle: string;
8
- skills: ManagedSkill[];
9
- empty_message: string;
10
- }): Promise<string | undefined>;
11
- export declare function show_skill_detail_modal(ctx: ExtensionCommandContext, skill: ManagedSkill): Promise<void>;
12
- export declare function show_skill_list_modal(ctx: ExtensionCommandContext, mgr: SkillsManager): Promise<void>;
13
- export declare function show_refresh_summary(ctx: ExtensionCommandContext, mgr: SkillsManager): Promise<void>;
14
- export declare function show_defaults_modal(ctx: ExtensionCommandContext, mgr: SkillsManager): Promise<void>;
15
- export declare function pick_profile(ctx: ExtensionCommandContext, mgr: SkillsManager, title: string): Promise<string | undefined>;
16
- export declare function show_profiles_modal(ctx: ExtensionCommandContext, mgr: SkillsManager): Promise<boolean>;
1
+ export { show_add_github_skill_modal, show_update_github_skills_modal, } from './skills-ui/github.js';
2
+ export { show_skills_home_modal } from './skills-ui/home.js';
3
+ export { show_importable_skills_modal } from './skills-ui/importable.js';
4
+ export { show_skills_manager_modal } from './skills-ui/manage.js';
5
+ export { pick_profile, show_defaults_modal, show_profiles_modal, show_refresh_summary, } from './skills-ui/profiles.js';
6
+ export { pick_skill, show_skill_detail_modal, show_skill_list_modal, } from './skills-ui/skill-list.js';
package/dist/skills-ui.js CHANGED
@@ -1,374 +1,7 @@
1
- import { show_input_modal, show_picker_modal, show_settings_modal, show_text_modal, } from '@spences10/pi-tui-modal';
2
- import { ENABLED, find_matching_imported_skill, find_skill, format_profile_detail, format_skill_detail, get_importable_state, profile_description, sets_equal, skill_status, sort_skills, to_importable_setting_item, to_setting_item, } from './skill-utils.js';
3
- export async function show_skills_home_modal(ctx, managed_count, importable_count, active_profile) {
4
- return await show_picker_modal(ctx, {
5
- title: 'Skills',
6
- subtitle: `${managed_count} managed ${importable_count} importable • profile ${active_profile}`,
7
- items: [
8
- {
9
- value: 'manage',
10
- label: 'Manage skills',
11
- description: 'Enable, disable, import, and sync skills',
12
- },
13
- {
14
- value: 'browse',
15
- label: 'Browse details',
16
- description: 'Open read-only detail views for discovered skills',
17
- },
18
- {
19
- value: 'import',
20
- label: 'Import skill',
21
- description: 'Copy an external skill into Pi-native storage',
22
- },
23
- {
24
- value: 'sync',
25
- label: 'Sync imported skill',
26
- description: 'Update an imported skill from its upstream source',
27
- },
28
- {
29
- value: 'profiles',
30
- label: 'Profiles',
31
- description: 'Create and switch named skill sets',
32
- },
33
- {
34
- value: 'refresh',
35
- label: 'Refresh discovery',
36
- description: 'Rescan managed and importable skills',
37
- },
38
- {
39
- value: 'defaults',
40
- label: 'Profile baseline',
41
- description: 'Choose whether this profile starts enabled or disabled',
42
- },
43
- ],
44
- footer: 'enter opens • esc close/back',
45
- });
46
- }
47
- export async function show_skills_manager_modal(ctx, mgr) {
48
- const discovered = sort_skills(mgr.discover());
49
- const importable = sort_skills(mgr.discover_importable());
50
- if (discovered.length === 0 && importable.length === 0) {
51
- ctx.ui.notify('No managed or importable skills found');
52
- return false;
53
- }
54
- const initial_enabled = new Set(discovered
55
- .filter((skill) => skill.enabled)
56
- .map((skill) => skill.key));
57
- const current_enabled = new Set(initial_enabled);
58
- const queued_imports = new Set();
59
- let reload_notice = null;
60
- const managed_items = discovered.map(to_setting_item);
61
- const importable_items = importable.map((skill) => to_importable_setting_item(discovered, skill));
62
- const all_items = [];
63
- if (managed_items.length > 0) {
64
- all_items.push({
65
- id: '__header_managed__',
66
- label: `── Managed (${managed_items.length}) ──`,
67
- description: '',
68
- currentValue: '',
69
- });
70
- all_items.push(...managed_items);
71
- }
72
- if (importable_items.length > 0) {
73
- all_items.push({
74
- id: '__header_importable__',
75
- label: `── Importable (${importable_items.length}) ──`,
76
- description: '',
77
- currentValue: '',
78
- });
79
- all_items.push(...importable_items);
80
- }
81
- const metadata_by_id = new Map(all_items.map((item) => [item.id, item.description ?? '']));
82
- for (const item of all_items) {
83
- if (!item.id.startsWith('__header_'))
84
- item.description = '';
85
- }
86
- const managed_keys = new Set(discovered.map((skill) => skill.key));
87
- const importable_map = new Map(importable.map((skill) => [skill.key, skill]));
88
- await show_settings_modal(ctx, {
89
- title: 'Skills',
90
- subtitle: () => {
91
- const enabled = current_enabled.size;
92
- const disabled = discovered.length - enabled;
93
- const queued = queued_imports.size;
94
- const parts = [
95
- `profile ${mgr.get_active_profile()}`,
96
- `${enabled} enabled`,
97
- `${disabled} disabled`,
98
- ];
99
- if (importable.length > 0)
100
- parts.push(`${importable.length} importable`);
101
- if (queued > 0)
102
- parts.push(`${queued} queued for import`);
103
- return parts.join(' • ');
104
- },
105
- items: all_items,
106
- max_visible: Math.min(Math.max(all_items.length + 4, 8), 12),
107
- enable_search: true,
108
- metadata: (item) => item ? metadata_by_id.get(item.id)?.split('\n') : undefined,
109
- on_change: (id, new_value) => {
110
- if (id.startsWith('__header_'))
111
- return;
112
- if (managed_keys.has(id)) {
113
- if (new_value === ENABLED) {
114
- current_enabled.add(id);
115
- mgr.enable(id);
116
- }
117
- else {
118
- current_enabled.delete(id);
119
- mgr.disable(id);
120
- }
121
- return;
122
- }
123
- const import_skill = importable_map.get(id);
124
- if (!import_skill)
125
- return;
126
- const state = get_importable_state(discovered, import_skill);
127
- if (state.action === 'import') {
128
- if (new_value === ENABLED)
129
- queued_imports.add(id);
130
- else
131
- queued_imports.delete(id);
132
- return;
133
- }
134
- if (state.action !== 'sync')
135
- return;
136
- const imported_skill = find_matching_imported_skill(discovered, import_skill);
137
- if (!imported_skill) {
138
- ctx.ui.notify(`Imported copy for ${import_skill.name} was not found`, 'warning');
139
- return;
140
- }
141
- try {
142
- const result = mgr.sync_skill(imported_skill.key);
143
- if (result.changed) {
144
- reload_notice = `Synced ${import_skill.name}. Reloading...`;
145
- return true;
146
- }
147
- ctx.ui.notify(`${import_skill.name} is already up to date.`, 'info');
148
- }
149
- catch (error) {
150
- ctx.ui.notify(error instanceof Error ? error.message : String(error), 'warning');
151
- }
152
- },
153
- });
154
- if (queued_imports.size > 0) {
155
- const imported_names = [];
156
- for (const key of queued_imports) {
157
- try {
158
- mgr.import_skill(key);
159
- imported_names.push(key);
160
- }
161
- catch (error) {
162
- ctx.ui.notify(error instanceof Error ? error.message : String(error), 'warning');
163
- }
164
- }
165
- if (imported_names.length > 0) {
166
- reload_notice = `Imported ${imported_names.length} skill(s). Reloading...`;
167
- }
168
- }
169
- if (reload_notice) {
170
- ctx.ui.notify(reload_notice, 'info');
171
- await ctx.reload();
172
- return true;
173
- }
174
- if (!sets_equal(initial_enabled, current_enabled)) {
175
- ctx.ui.notify('Reloading to apply updated skills...', 'info');
176
- await ctx.reload();
177
- return true;
178
- }
179
- return false;
180
- }
181
- export async function pick_skill(ctx, options) {
182
- return await show_picker_modal(ctx, {
183
- title: options.title,
184
- subtitle: options.subtitle,
185
- items: options.skills.map((skill) => ({
186
- value: skill.key,
187
- label: skill.name,
188
- description: `${skill_status(skill)} • ${skill.source} • ${skill.key}`,
189
- })),
190
- empty_message: options.empty_message,
191
- });
192
- }
193
- export async function show_skill_detail_modal(ctx, skill) {
194
- await show_text_modal(ctx, {
195
- title: skill.name,
196
- subtitle: `${skill_status(skill)} • ${skill.source}`,
197
- text: format_skill_detail(skill),
198
- });
199
- }
200
- export async function show_skill_list_modal(ctx, mgr) {
201
- while (true) {
202
- const skills = sort_skills([
203
- ...mgr.discover(),
204
- ...mgr.discover_importable(),
205
- ]);
206
- const key = await pick_skill(ctx, {
207
- title: 'Browse skills',
208
- subtitle: `${mgr.discover().length} managed • ${mgr.discover_importable().length} importable`,
209
- skills,
210
- empty_message: 'No skills found',
211
- });
212
- if (!key)
213
- return;
214
- await show_skill_detail_modal(ctx, find_skill(skills, key));
215
- }
216
- }
217
- export async function show_refresh_summary(ctx, mgr) {
218
- mgr.refresh();
219
- await show_text_modal(ctx, {
220
- title: 'Skills refreshed',
221
- text: `${mgr.discover().length} managed skills\n${mgr.discover_importable().length} importable skills found`,
222
- });
223
- }
224
- export async function show_defaults_modal(ctx, mgr) {
225
- const selected = await show_picker_modal(ctx, {
226
- title: 'Skill profile baseline',
227
- subtitle: `Active profile: ${mgr.get_active_profile()}`,
228
- items: [
229
- {
230
- value: 'all-enabled',
231
- label: 'All enabled',
232
- description: 'This profile enables every matching skill',
233
- },
234
- {
235
- value: 'all-disabled',
236
- label: 'All disabled',
237
- description: 'This profile only enables explicit includes',
238
- },
239
- ],
240
- });
241
- if (!selected)
242
- return;
243
- mgr.set_defaults(selected);
244
- await show_text_modal(ctx, {
245
- title: 'Skill profile baseline updated',
246
- text: `Active profile baseline: ${selected}`,
247
- });
248
- }
249
- export async function pick_profile(ctx, mgr, title) {
250
- return await show_picker_modal(ctx, {
251
- title,
252
- subtitle: `Active: ${mgr.get_active_profile()}`,
253
- items: mgr.list_profiles().map((profile) => ({
254
- value: profile.name,
255
- label: `${profile.active ? '● ' : '○ '}${profile.name}`,
256
- description: profile_description(profile),
257
- })),
258
- empty_message: 'No skill profiles found',
259
- });
260
- }
261
- export async function show_profiles_modal(ctx, mgr) {
262
- while (true) {
263
- const selected = await show_picker_modal(ctx, {
264
- title: 'Skill profiles',
265
- subtitle: `Active: ${mgr.get_active_profile()}`,
266
- items: [
267
- {
268
- value: 'use',
269
- label: 'Use profile',
270
- description: 'Switch the active skill profile and reload',
271
- },
272
- {
273
- value: 'create',
274
- label: 'Create profile',
275
- description: 'Create a named skill profile',
276
- },
277
- {
278
- value: 'include',
279
- label: 'Enable skill/pattern',
280
- description: 'Enable matching skills in a profile',
281
- },
282
- {
283
- value: 'exclude',
284
- label: 'Disable skill/pattern',
285
- description: 'Disable matching skills in a profile',
286
- },
287
- {
288
- value: 'show',
289
- label: 'Show profile details',
290
- description: 'Inspect include/exclude patterns',
291
- },
292
- ],
293
- footer: 'patterns match skill names, keys, sources, or paths; * is supported',
294
- });
295
- if (!selected)
296
- return false;
297
- if (selected === 'use') {
298
- const profile = await pick_profile(ctx, mgr, 'Use skill profile');
299
- if (!profile)
300
- continue;
301
- try {
302
- mgr.use_profile(profile);
303
- ctx.ui.notify(`Using skill profile ${profile}. Reloading...`, 'info');
304
- await ctx.reload();
305
- return true;
306
- }
307
- catch (error) {
308
- ctx.ui.notify(error instanceof Error ? error.message : String(error), 'warning');
309
- }
310
- }
311
- else if (selected === 'create') {
312
- const name = await show_input_modal(ctx, {
313
- title: 'Create skill profile',
314
- label: 'Profile name',
315
- trim: true,
316
- });
317
- if (!name)
318
- continue;
319
- try {
320
- mgr.create_profile(name);
321
- await show_text_modal(ctx, {
322
- title: 'Skill profile created',
323
- text: `Created empty profile ${name}. Use /skills profile use ${name} to activate it, then /skills enable <skill> to add skills.`,
324
- });
325
- }
326
- catch (error) {
327
- ctx.ui.notify(error instanceof Error ? error.message : String(error), 'warning');
328
- }
329
- }
330
- else if (selected === 'include' || selected === 'exclude') {
331
- const profile = await pick_profile(ctx, mgr, selected === 'include'
332
- ? 'Choose enable profile'
333
- : 'Choose disable profile');
334
- if (!profile)
335
- continue;
336
- const pattern = await show_input_modal(ctx, {
337
- title: selected === 'include'
338
- ? 'Enable skill or pattern'
339
- : 'Disable skill or pattern',
340
- subtitle: `Profile: ${profile}`,
341
- label: 'Skill name, key, or pattern',
342
- trim: true,
343
- });
344
- if (!pattern)
345
- continue;
346
- try {
347
- if (selected === 'include')
348
- mgr.include_in_profile(profile, pattern);
349
- else
350
- mgr.exclude_from_profile(profile, pattern);
351
- ctx.ui.notify(`Updated ${profile}. Reloading...`, 'info');
352
- await ctx.reload();
353
- return true;
354
- }
355
- catch (error) {
356
- ctx.ui.notify(error instanceof Error ? error.message : String(error), 'warning');
357
- }
358
- }
359
- else if (selected === 'show') {
360
- const profile_name = await pick_profile(ctx, mgr, 'Show skill profile');
361
- const profile = mgr
362
- .list_profiles()
363
- .find((p) => p.name === profile_name);
364
- if (!profile)
365
- continue;
366
- await show_text_modal(ctx, {
367
- title: profile.name,
368
- subtitle: profile_description(profile),
369
- text: format_profile_detail(profile),
370
- });
371
- }
372
- }
373
- }
1
+ export { show_add_github_skill_modal, show_update_github_skills_modal, } from './skills-ui/github.js';
2
+ export { show_skills_home_modal } from './skills-ui/home.js';
3
+ export { show_importable_skills_modal } from './skills-ui/importable.js';
4
+ export { show_skills_manager_modal } from './skills-ui/manage.js';
5
+ export { pick_profile, show_defaults_modal, show_profiles_modal, show_refresh_summary, } from './skills-ui/profiles.js';
6
+ export { pick_skill, show_skill_detail_modal, show_skill_list_modal, } from './skills-ui/skill-list.js';
374
7
  //# sourceMappingURL=skills-ui.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"skills-ui.js","sourceRoot":"","sources":["../src/skills-ui.ts"],"names":[],"mappings":"AAEA,OAAO,EACN,gBAAgB,EAChB,iBAAiB,EACjB,mBAAmB,EACnB,eAAe,GACf,MAAM,yBAAyB,CAAC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