@genart-dev/mcp-server 0.4.8 → 0.4.10
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 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +19 -5
- package/dist/index.js.map +1 -1
- package/dist/lib.cjs +19 -5
- package/dist/lib.cjs.map +1 -1
- package/dist/lib.js +19 -5
- 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,7 +5535,11 @@ function registerSketchTools(server, state) {
|
|
|
5529
5535
|
});
|
|
5530
5536
|
return {
|
|
5531
5537
|
content: [
|
|
5532
|
-
{
|
|
5538
|
+
{
|
|
5539
|
+
type: "image",
|
|
5540
|
+
data: captureResult.previewJpegBase64,
|
|
5541
|
+
mimeType: "image/jpeg"
|
|
5542
|
+
},
|
|
5533
5543
|
{ type: "text", text: JSON.stringify({
|
|
5534
5544
|
...result,
|
|
5535
5545
|
capture: captureResult.metadata
|
|
@@ -6115,7 +6125,11 @@ function registerCaptureTools(server, state) {
|
|
|
6115
6125
|
console.error(`[capture_screenshot] jpeg base64 length: ${result.previewJpegBase64.length}`);
|
|
6116
6126
|
return {
|
|
6117
6127
|
content: [
|
|
6118
|
-
{
|
|
6128
|
+
{
|
|
6129
|
+
type: "image",
|
|
6130
|
+
data: result.previewJpegBase64,
|
|
6131
|
+
mimeType: "image/jpeg"
|
|
6132
|
+
},
|
|
6119
6133
|
{ type: "text", text: JSON.stringify(result.metadata, null, 2) }
|
|
6120
6134
|
]
|
|
6121
6135
|
};
|