@genart-dev/mcp-server 0.4.9 → 0.4.11
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.cjs +19 -16
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +19 -16
- package/dist/index.js.map +1 -1
- package/dist/lib.cjs +19 -16
- package/dist/lib.cjs.map +1 -1
- package/dist/lib.js +19 -16
- package/dist/lib.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2830,9 +2830,15 @@ async function captureHtmlMulti(options) {
|
|
|
2830
2830
|
// src/tools/capture.ts
|
|
2831
2831
|
var registry2 = createDefaultRegistry2();
|
|
2832
2832
|
function openPreview(filePath) {
|
|
2833
|
-
const cmd = process.platform === "darwin" ? "open" : process.platform === "win32" ? "start" : "xdg-open";
|
|
2834
|
-
|
|
2835
|
-
|
|
2833
|
+
const cmd = process.platform === "darwin" ? "/usr/bin/open" : process.platform === "win32" ? "start" : "xdg-open";
|
|
2834
|
+
console.error(`[openPreview] opening: ${filePath}`);
|
|
2835
|
+
exec(`${cmd} "${filePath}"`, (err, _stdout, stderr) => {
|
|
2836
|
+
if (err) {
|
|
2837
|
+
console.error(`[openPreview] exec error: ${err.message}`);
|
|
2838
|
+
}
|
|
2839
|
+
if (stderr) {
|
|
2840
|
+
console.error(`[openPreview] stderr: ${stderr}`);
|
|
2841
|
+
}
|
|
2836
2842
|
});
|
|
2837
2843
|
}
|
|
2838
2844
|
function applyOverrides(sketch, overrides) {
|
|
@@ -5529,16 +5535,15 @@ function registerSketchTools(server, state) {
|
|
|
5529
5535
|
});
|
|
5530
5536
|
return {
|
|
5531
5537
|
content: [
|
|
5532
|
-
{
|
|
5533
|
-
type: "image",
|
|
5534
|
-
data: captureResult.previewJpegBase64,
|
|
5535
|
-
mimeType: "image/jpeg",
|
|
5536
|
-
annotations: { audience: ["user", "assistant"] }
|
|
5537
|
-
},
|
|
5538
5538
|
{ type: "text", text: JSON.stringify({
|
|
5539
5539
|
...result,
|
|
5540
5540
|
capture: captureResult.metadata
|
|
5541
|
-
}, null, 2) }
|
|
5541
|
+
}, null, 2) },
|
|
5542
|
+
{
|
|
5543
|
+
type: "image",
|
|
5544
|
+
data: captureResult.previewJpegBase64,
|
|
5545
|
+
mimeType: "image/jpeg"
|
|
5546
|
+
}
|
|
5542
5547
|
]
|
|
5543
5548
|
};
|
|
5544
5549
|
} catch (captureErr) {
|
|
@@ -6120,13 +6125,12 @@ function registerCaptureTools(server, state) {
|
|
|
6120
6125
|
console.error(`[capture_screenshot] jpeg base64 length: ${result.previewJpegBase64.length}`);
|
|
6121
6126
|
return {
|
|
6122
6127
|
content: [
|
|
6128
|
+
{ type: "text", text: JSON.stringify(result.metadata, null, 2) },
|
|
6123
6129
|
{
|
|
6124
6130
|
type: "image",
|
|
6125
6131
|
data: result.previewJpegBase64,
|
|
6126
|
-
mimeType: "image/jpeg"
|
|
6127
|
-
|
|
6128
|
-
},
|
|
6129
|
-
{ type: "text", text: JSON.stringify(result.metadata, null, 2) }
|
|
6132
|
+
mimeType: "image/jpeg"
|
|
6133
|
+
}
|
|
6130
6134
|
]
|
|
6131
6135
|
};
|
|
6132
6136
|
} catch (e) {
|
|
@@ -6155,8 +6159,7 @@ function registerCaptureTools(server, state) {
|
|
|
6155
6159
|
content.push({
|
|
6156
6160
|
type: "image",
|
|
6157
6161
|
data: item.inlineJpegBase64,
|
|
6158
|
-
mimeType: "image/jpeg"
|
|
6159
|
-
annotations: { audience: ["user", "assistant"] }
|
|
6162
|
+
mimeType: "image/jpeg"
|
|
6160
6163
|
});
|
|
6161
6164
|
content.push({
|
|
6162
6165
|
type: "text",
|