promptgraph-mcp 2.9.32 → 2.9.33
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/index.js +13 -3
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -369,9 +369,19 @@ server.setRequestHandler(GetPromptRequestSchema, async (request) => {
|
|
|
369
369
|
let content = '';
|
|
370
370
|
try { content = fsSync.readFileSync(top.path, 'utf8'); } catch {}
|
|
371
371
|
const otherMatches = results.slice(1).map(r => `- **${r.name}** (${r.score?.toFixed(2)})`).join('\n');
|
|
372
|
-
const
|
|
373
|
-
|
|
374
|
-
|
|
372
|
+
const otherMatchesNote = otherMatches ? `\n\n_Other matches: ${otherMatches}_` : '';
|
|
373
|
+
return {
|
|
374
|
+
messages: [
|
|
375
|
+
{
|
|
376
|
+
role: 'user',
|
|
377
|
+
content: { type: 'text', text: `Load skill: ${top.name}` },
|
|
378
|
+
},
|
|
379
|
+
{
|
|
380
|
+
role: 'assistant',
|
|
381
|
+
content: { type: 'text', text: `I've loaded the **${top.name}** skill (score: ${score.toFixed(2)}). Here are the instructions I'll follow:\n\n---\n\n${content}${otherMatchesNote}\n\n---\n\nSkill loaded. What would you like me to do?` },
|
|
382
|
+
},
|
|
383
|
+
],
|
|
384
|
+
};
|
|
375
385
|
}
|
|
376
386
|
|
|
377
387
|
// Low confidence — show top matches, let user pick
|