@skyelight/mcp 0.1.1 → 0.1.2
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/package.json +1 -1
- package/src/tools.js +36 -1
package/package.json
CHANGED
package/src/tools.js
CHANGED
|
@@ -172,7 +172,7 @@ export function toolDefinitions(opts = {}) {
|
|
|
172
172
|
description:
|
|
173
173
|
"Move an item to open, deferred or resolved. Use it to close the loop after you have " +
|
|
174
174
|
"fixed something and said so \u2014 post_update first, so the person who reported it " +
|
|
175
|
-
|
|
175
|
+
'reads what changed, then set_status. "deferred" is for work that is real but not now.',
|
|
176
176
|
inputSchema: {
|
|
177
177
|
type: "object",
|
|
178
178
|
properties: {
|
|
@@ -398,6 +398,41 @@ export function renderItem(item) {
|
|
|
398
398
|
? `Written by ${where}, in ${from.join(" on ")}.`
|
|
399
399
|
: `Written by ${where}.`,
|
|
400
400
|
);
|
|
401
|
+
// The permalink, when the project names a repository. Pinned to the
|
|
402
|
+
// commit the page carried rather than to a branch, so it opens the code
|
|
403
|
+
// the person was actually looking at.
|
|
404
|
+
if (item.sourceUrl) lines.push(item.sourceUrl);
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
// The stamps read in both directions.
|
|
408
|
+
//
|
|
409
|
+
// Separated from the one-line `Written by` above because they answer a
|
|
410
|
+
// different question. That line says where the pinned element came from;
|
|
411
|
+
// this says which component it lives in, and which of its parts a request
|
|
412
|
+
// is likely to be about. A person points at a row and means the text
|
|
413
|
+
// inside it far more often than they mean the row.
|
|
414
|
+
const path = item.sourcePath;
|
|
415
|
+
if (path && (path.above.length || path.below.length)) {
|
|
416
|
+
if (path.above.length) {
|
|
417
|
+
lines.push("");
|
|
418
|
+
lines.push("Nested inside");
|
|
419
|
+
// Outermost first, so a repeated file reads as one component and a
|
|
420
|
+
// change of file reads as a boundary between two.
|
|
421
|
+
for (const step of path.above) {
|
|
422
|
+
lines.push(` ${step.file}:${step.line ?? "?"} <${step.tag}>`);
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
if (path.below.length) {
|
|
426
|
+
lines.push("");
|
|
427
|
+
lines.push("Contains");
|
|
428
|
+
for (const step of path.below) {
|
|
429
|
+
const indent = " ".repeat((step.depth ?? 0) + 1);
|
|
430
|
+
const text = step.text ? ` "${step.text}"` : "";
|
|
431
|
+
lines.push(
|
|
432
|
+
`${indent}<${step.tag}> ${step.file}:${step.line ?? "?"}${text}`,
|
|
433
|
+
);
|
|
434
|
+
}
|
|
435
|
+
}
|
|
401
436
|
}
|
|
402
437
|
|
|
403
438
|
return lines.join("\n");
|