@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.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,7 +5520,11 @@ function registerSketchTools(server, state) {
|
|
|
5514
5520
|
});
|
|
5515
5521
|
return {
|
|
5516
5522
|
content: [
|
|
5517
|
-
{
|
|
5523
|
+
{
|
|
5524
|
+
type: "image",
|
|
5525
|
+
data: captureResult.previewJpegBase64,
|
|
5526
|
+
mimeType: "image/jpeg"
|
|
5527
|
+
},
|
|
5518
5528
|
{ type: "text", text: JSON.stringify({
|
|
5519
5529
|
...result,
|
|
5520
5530
|
capture: captureResult.metadata
|
|
@@ -6100,7 +6110,11 @@ function registerCaptureTools(server, state) {
|
|
|
6100
6110
|
console.error(`[capture_screenshot] jpeg base64 length: ${result.previewJpegBase64.length}`);
|
|
6101
6111
|
return {
|
|
6102
6112
|
content: [
|
|
6103
|
-
{
|
|
6113
|
+
{
|
|
6114
|
+
type: "image",
|
|
6115
|
+
data: result.previewJpegBase64,
|
|
6116
|
+
mimeType: "image/jpeg"
|
|
6117
|
+
},
|
|
6104
6118
|
{ type: "text", text: JSON.stringify(result.metadata, null, 2) }
|
|
6105
6119
|
]
|
|
6106
6120
|
};
|