@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.cjs
CHANGED
|
@@ -2828,9 +2828,15 @@ async function captureHtmlMulti(options) {
|
|
|
2828
2828
|
// src/tools/capture.ts
|
|
2829
2829
|
var registry2 = (0, import_core9.createDefaultRegistry)();
|
|
2830
2830
|
function openPreview(filePath) {
|
|
2831
|
-
const cmd = process.platform === "darwin" ? "open" : process.platform === "win32" ? "start" : "xdg-open";
|
|
2832
|
-
|
|
2833
|
-
|
|
2831
|
+
const cmd = process.platform === "darwin" ? "/usr/bin/open" : process.platform === "win32" ? "start" : "xdg-open";
|
|
2832
|
+
console.error(`[openPreview] opening: ${filePath}`);
|
|
2833
|
+
(0, import_child_process.exec)(`${cmd} "${filePath}"`, (err, _stdout, stderr) => {
|
|
2834
|
+
if (err) {
|
|
2835
|
+
console.error(`[openPreview] exec error: ${err.message}`);
|
|
2836
|
+
}
|
|
2837
|
+
if (stderr) {
|
|
2838
|
+
console.error(`[openPreview] stderr: ${stderr}`);
|
|
2839
|
+
}
|
|
2834
2840
|
});
|
|
2835
2841
|
}
|
|
2836
2842
|
function applyOverrides(sketch, overrides) {
|
|
@@ -5514,16 +5520,15 @@ function registerSketchTools(server, state) {
|
|
|
5514
5520
|
});
|
|
5515
5521
|
return {
|
|
5516
5522
|
content: [
|
|
5517
|
-
{
|
|
5518
|
-
type: "image",
|
|
5519
|
-
data: captureResult.previewJpegBase64,
|
|
5520
|
-
mimeType: "image/jpeg",
|
|
5521
|
-
annotations: { audience: ["user", "assistant"] }
|
|
5522
|
-
},
|
|
5523
5523
|
{ type: "text", text: JSON.stringify({
|
|
5524
5524
|
...result,
|
|
5525
5525
|
capture: captureResult.metadata
|
|
5526
|
-
}, null, 2) }
|
|
5526
|
+
}, null, 2) },
|
|
5527
|
+
{
|
|
5528
|
+
type: "image",
|
|
5529
|
+
data: captureResult.previewJpegBase64,
|
|
5530
|
+
mimeType: "image/jpeg"
|
|
5531
|
+
}
|
|
5527
5532
|
]
|
|
5528
5533
|
};
|
|
5529
5534
|
} catch (captureErr) {
|
|
@@ -6105,13 +6110,12 @@ function registerCaptureTools(server, state) {
|
|
|
6105
6110
|
console.error(`[capture_screenshot] jpeg base64 length: ${result.previewJpegBase64.length}`);
|
|
6106
6111
|
return {
|
|
6107
6112
|
content: [
|
|
6113
|
+
{ type: "text", text: JSON.stringify(result.metadata, null, 2) },
|
|
6108
6114
|
{
|
|
6109
6115
|
type: "image",
|
|
6110
6116
|
data: result.previewJpegBase64,
|
|
6111
|
-
mimeType: "image/jpeg"
|
|
6112
|
-
|
|
6113
|
-
},
|
|
6114
|
-
{ type: "text", text: JSON.stringify(result.metadata, null, 2) }
|
|
6117
|
+
mimeType: "image/jpeg"
|
|
6118
|
+
}
|
|
6115
6119
|
]
|
|
6116
6120
|
};
|
|
6117
6121
|
} catch (e) {
|
|
@@ -6140,8 +6144,7 @@ function registerCaptureTools(server, state) {
|
|
|
6140
6144
|
content.push({
|
|
6141
6145
|
type: "image",
|
|
6142
6146
|
data: item.inlineJpegBase64,
|
|
6143
|
-
mimeType: "image/jpeg"
|
|
6144
|
-
annotations: { audience: ["user", "assistant"] }
|
|
6147
|
+
mimeType: "image/jpeg"
|
|
6145
6148
|
});
|
|
6146
6149
|
content.push({
|
|
6147
6150
|
type: "text",
|