@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/lib.cjs
CHANGED
|
@@ -2529,9 +2529,15 @@ async function captureHtmlMulti(options) {
|
|
|
2529
2529
|
// src/tools/capture.ts
|
|
2530
2530
|
var registry2 = (0, import_core8.createDefaultRegistry)();
|
|
2531
2531
|
function openPreview(filePath) {
|
|
2532
|
-
const cmd = process.platform === "darwin" ? "open" : process.platform === "win32" ? "start" : "xdg-open";
|
|
2533
|
-
|
|
2534
|
-
|
|
2532
|
+
const cmd = process.platform === "darwin" ? "/usr/bin/open" : process.platform === "win32" ? "start" : "xdg-open";
|
|
2533
|
+
console.error(`[openPreview] opening: ${filePath}`);
|
|
2534
|
+
(0, import_child_process.exec)(`${cmd} "${filePath}"`, (err, _stdout, stderr) => {
|
|
2535
|
+
if (err) {
|
|
2536
|
+
console.error(`[openPreview] exec error: ${err.message}`);
|
|
2537
|
+
}
|
|
2538
|
+
if (stderr) {
|
|
2539
|
+
console.error(`[openPreview] stderr: ${stderr}`);
|
|
2540
|
+
}
|
|
2535
2541
|
});
|
|
2536
2542
|
}
|
|
2537
2543
|
function applyOverrides(sketch, overrides) {
|
|
@@ -5215,7 +5221,11 @@ function registerSketchTools(server, state) {
|
|
|
5215
5221
|
});
|
|
5216
5222
|
return {
|
|
5217
5223
|
content: [
|
|
5218
|
-
{
|
|
5224
|
+
{
|
|
5225
|
+
type: "image",
|
|
5226
|
+
data: captureResult.previewJpegBase64,
|
|
5227
|
+
mimeType: "image/jpeg"
|
|
5228
|
+
},
|
|
5219
5229
|
{ type: "text", text: JSON.stringify({
|
|
5220
5230
|
...result,
|
|
5221
5231
|
capture: captureResult.metadata
|
|
@@ -5801,7 +5811,11 @@ function registerCaptureTools(server, state) {
|
|
|
5801
5811
|
console.error(`[capture_screenshot] jpeg base64 length: ${result.previewJpegBase64.length}`);
|
|
5802
5812
|
return {
|
|
5803
5813
|
content: [
|
|
5804
|
-
{
|
|
5814
|
+
{
|
|
5815
|
+
type: "image",
|
|
5816
|
+
data: result.previewJpegBase64,
|
|
5817
|
+
mimeType: "image/jpeg"
|
|
5818
|
+
},
|
|
5805
5819
|
{ type: "text", text: JSON.stringify(result.metadata, null, 2) }
|
|
5806
5820
|
]
|
|
5807
5821
|
};
|