@ichintansoni/skills-master 0.1.14 → 0.1.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.
- package/dist/bin.js +3 -22
- package/package.json +1 -1
package/dist/bin.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { Command } from "commander";
|
|
5
5
|
|
|
6
6
|
// package.json
|
|
7
|
-
var version = "0.1.
|
|
7
|
+
var version = "0.1.15";
|
|
8
8
|
|
|
9
9
|
// src/schema/projectConfig.ts
|
|
10
10
|
import { z } from "zod";
|
|
@@ -200,9 +200,6 @@ function condenseBody(body, opts = {}) {
|
|
|
200
200
|
strippedLink = true;
|
|
201
201
|
return text;
|
|
202
202
|
});
|
|
203
|
-
if (opts.openQuestion === "summarize") {
|
|
204
|
-
out = summarizeOpenQuestion(out);
|
|
205
|
-
}
|
|
206
203
|
out = out.replace(/\n{3,}/g, "\n\n").trim();
|
|
207
204
|
if (opts.hadResources || strippedLink) {
|
|
208
205
|
out += `
|
|
@@ -211,16 +208,6 @@ function condenseBody(body, opts = {}) {
|
|
|
211
208
|
}
|
|
212
209
|
return out + "\n";
|
|
213
210
|
}
|
|
214
|
-
function summarizeOpenQuestion(body) {
|
|
215
|
-
const re = /^## Open question[ \t]*\n([\s\S]*?)(?=\n## |(?![\s\S]))/m;
|
|
216
|
-
return body.replace(re, (_m, section) => {
|
|
217
|
-
const firstPara = section.trim().split(/\n\s*\n/)[0]?.replace(/\s+/g, " ").trim() ?? "";
|
|
218
|
-
return `## Open question
|
|
219
|
-
|
|
220
|
-
Tradeoff: ${firstPara}
|
|
221
|
-
`;
|
|
222
|
-
});
|
|
223
|
-
}
|
|
224
211
|
function sectionHighlights(body, section, max) {
|
|
225
212
|
const re = new RegExp(`^## ${section}\\n([\\s\\S]*?)(?=\\n## |(?![\\s\\S]))`, "m");
|
|
226
213
|
const m = re.exec(body);
|
|
@@ -273,10 +260,7 @@ var cursorEmitter = {
|
|
|
273
260
|
fm.alwaysApply = false;
|
|
274
261
|
const xm = skill.frontmatter["x-skills-master"];
|
|
275
262
|
const body = withStabilityNote(
|
|
276
|
-
condenseBody(skill.body, {
|
|
277
|
-
openQuestion: "keep",
|
|
278
|
-
hadResources: hasResources(skill.resources)
|
|
279
|
-
}),
|
|
263
|
+
condenseBody(skill.body, { hadResources: hasResources(skill.resources) }),
|
|
280
264
|
stabilityNote(xm.stability, xm.snapshot_date)
|
|
281
265
|
);
|
|
282
266
|
return [
|
|
@@ -306,10 +290,7 @@ var copilotEmitter = {
|
|
|
306
290
|
};
|
|
307
291
|
const xm = skill.frontmatter["x-skills-master"];
|
|
308
292
|
const body = withStabilityNote(
|
|
309
|
-
condenseBody(skill.body, {
|
|
310
|
-
openQuestion: "keep",
|
|
311
|
-
hadResources: hasResources(skill.resources)
|
|
312
|
-
}),
|
|
293
|
+
condenseBody(skill.body, { hadResources: hasResources(skill.resources) }),
|
|
313
294
|
stabilityNote(xm.stability, xm.snapshot_date)
|
|
314
295
|
);
|
|
315
296
|
const pointer = `For ${titleFromName(skill.name)} guidance, see \`${instructionsPath}\`.`;
|
package/package.json
CHANGED