mcp-feedback-enhanced 0.1.46 → 0.1.55
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 +16 -6
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -433,14 +433,24 @@ server.tool('interactive_feedback', 'Collect feedback from user through VSCode e
|
|
|
433
433
|
debug(`interactive_feedback called: project=${project_directory}, agent=${agent_name || 'default'}`);
|
|
434
434
|
try {
|
|
435
435
|
const result = await requestFeedback(project_directory, summary, timeout || 600, agent_name);
|
|
436
|
-
//
|
|
437
|
-
|
|
436
|
+
// Build content array with text and images
|
|
437
|
+
const content = [{ type: 'text', text: `User Feedback:\n${result.feedback}` }];
|
|
438
|
+
// Add images as MCP image content items
|
|
438
439
|
if (result.images && result.images.length > 0) {
|
|
439
|
-
|
|
440
|
+
debug(`Processing ${result.images.length} image(s)`);
|
|
441
|
+
for (const img of result.images) {
|
|
442
|
+
// img is { name: string, data: string (base64) }
|
|
443
|
+
if (img && img.data) {
|
|
444
|
+
content.push({
|
|
445
|
+
type: 'image',
|
|
446
|
+
data: img.data,
|
|
447
|
+
mimeType: 'image/png' // Default to PNG; could infer from name
|
|
448
|
+
});
|
|
449
|
+
debug(`Added image: ${img.name || 'unnamed'}`);
|
|
450
|
+
}
|
|
451
|
+
}
|
|
440
452
|
}
|
|
441
|
-
return {
|
|
442
|
-
content: [{ type: 'text', text: response }]
|
|
443
|
-
};
|
|
453
|
+
return { content };
|
|
444
454
|
}
|
|
445
455
|
catch (error) {
|
|
446
456
|
debug(`Feedback error: ${error.message}`);
|