@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.js
CHANGED
|
@@ -2511,9 +2511,15 @@ async function captureHtmlMulti(options) {
|
|
|
2511
2511
|
// src/tools/capture.ts
|
|
2512
2512
|
var registry2 = createDefaultRegistry2();
|
|
2513
2513
|
function openPreview(filePath) {
|
|
2514
|
-
const cmd = process.platform === "darwin" ? "open" : process.platform === "win32" ? "start" : "xdg-open";
|
|
2515
|
-
|
|
2516
|
-
|
|
2514
|
+
const cmd = process.platform === "darwin" ? "/usr/bin/open" : process.platform === "win32" ? "start" : "xdg-open";
|
|
2515
|
+
console.error(`[openPreview] opening: ${filePath}`);
|
|
2516
|
+
exec(`${cmd} "${filePath}"`, (err, _stdout, stderr) => {
|
|
2517
|
+
if (err) {
|
|
2518
|
+
console.error(`[openPreview] exec error: ${err.message}`);
|
|
2519
|
+
}
|
|
2520
|
+
if (stderr) {
|
|
2521
|
+
console.error(`[openPreview] stderr: ${stderr}`);
|
|
2522
|
+
}
|
|
2517
2523
|
});
|
|
2518
2524
|
}
|
|
2519
2525
|
function applyOverrides(sketch, overrides) {
|
|
@@ -5210,7 +5216,11 @@ function registerSketchTools(server, state) {
|
|
|
5210
5216
|
});
|
|
5211
5217
|
return {
|
|
5212
5218
|
content: [
|
|
5213
|
-
{
|
|
5219
|
+
{
|
|
5220
|
+
type: "image",
|
|
5221
|
+
data: captureResult.previewJpegBase64,
|
|
5222
|
+
mimeType: "image/jpeg"
|
|
5223
|
+
},
|
|
5214
5224
|
{ type: "text", text: JSON.stringify({
|
|
5215
5225
|
...result,
|
|
5216
5226
|
capture: captureResult.metadata
|
|
@@ -5796,7 +5806,11 @@ function registerCaptureTools(server, state) {
|
|
|
5796
5806
|
console.error(`[capture_screenshot] jpeg base64 length: ${result.previewJpegBase64.length}`);
|
|
5797
5807
|
return {
|
|
5798
5808
|
content: [
|
|
5799
|
-
{
|
|
5809
|
+
{
|
|
5810
|
+
type: "image",
|
|
5811
|
+
data: result.previewJpegBase64,
|
|
5812
|
+
mimeType: "image/jpeg"
|
|
5813
|
+
},
|
|
5800
5814
|
{ type: "text", text: JSON.stringify(result.metadata, null, 2) }
|
|
5801
5815
|
]
|
|
5802
5816
|
};
|