viewgate-mcp 1.0.36 → 1.0.37

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.
Files changed (2) hide show
  1. package/dist/index.js +17 -8
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -292,8 +292,11 @@ Task: ${ann.message}
292
292
  Lang: ${rawData.preferredLanguage === 'es' ? 'ES' : 'EN'}`
293
293
  };
294
294
  });
295
+ const langHint = rawData.preferredLanguage === 'es'
296
+ ? "[INSTRUCTION: Project is in SPANISH. Provide all comments and aiAnalysis in SPANISH.]\n\n"
297
+ : "[INSTRUCTION: Provide all comments and aiAnalysis in English.]\n\n";
295
298
  return {
296
- content: [{ type: "text", text: JSON.stringify({ preferredLanguage: rawData.preferredLanguage || 'en', annotations: annotationsWithTips }, null, 2) }],
299
+ content: [{ type: "text", text: langHint + JSON.stringify({ preferredLanguage: rawData.preferredLanguage || 'en', annotations: annotationsWithTips }, null, 2) }],
297
300
  };
298
301
  }
299
302
  case "mark_annotation_ready": {
@@ -313,7 +316,7 @@ Lang: ${rawData.preferredLanguage === 'es' ? 'ES' : 'EN'}`
313
316
  });
314
317
  if (!response.ok)
315
318
  throw new Error(`Backend responded with ${response.status}`);
316
- const data = await response.json();
319
+ const data = (await response.json());
317
320
  return {
318
321
  content: [{ type: "text", text: JSON.stringify(data, null, 2) }],
319
322
  };
@@ -333,7 +336,7 @@ Lang: ${rawData.preferredLanguage === 'es' ? 'ES' : 'EN'}`
333
336
  });
334
337
  if (!response.ok)
335
338
  throw new Error(`Backend responded with ${response.status}`);
336
- const data = await response.json();
339
+ const data = (await response.json());
337
340
  return {
338
341
  content: [{ type: "text", text: JSON.stringify(data, null, 2) }],
339
342
  };
@@ -349,8 +352,11 @@ Lang: ${rawData.preferredLanguage === 'es' ? 'ES' : 'EN'}`
349
352
  });
350
353
  if (!response.ok)
351
354
  throw new Error(`Backend responded with ${response.status}`);
352
- const data = await response.json();
353
- return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
355
+ const data = (await response.json());
356
+ const langHint = data.preferredLanguage === 'es'
357
+ ? "[INSTRUCTION: Project is in SPANISH. Provide all comments and aiAnalysis in SPANISH.]\n\n"
358
+ : (data.preferredLanguage === 'en' ? "[INSTRUCTION: Provide all comments and aiAnalysis in English.]\n\n" : "");
359
+ return { content: [{ type: "text", text: langHint + JSON.stringify(data, null, 2) }] };
354
360
  }
355
361
  case "sync_endpoints": {
356
362
  const args = request.params.arguments;
@@ -370,7 +376,7 @@ Lang: ${rawData.preferredLanguage === 'es' ? 'ES' : 'EN'}`
370
376
  });
371
377
  if (!response.ok)
372
378
  throw new Error(`Backend responded with ${response.status}`);
373
- const data = await response.json();
379
+ const data = (await response.json());
374
380
  return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
375
381
  }
376
382
  case "get_ai_resolved_tickets": {
@@ -379,8 +385,11 @@ Lang: ${rawData.preferredLanguage === 'es' ? 'ES' : 'EN'}`
379
385
  });
380
386
  if (!response.ok)
381
387
  throw new Error(`Backend responded with ${response.status}`);
382
- const data = await response.json();
383
- return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
388
+ const data = (await response.json());
389
+ const langHint = data.preferredLanguage === 'es'
390
+ ? "[INSTRUCTION: Project is in SPANISH. Provide all comments and aiAnalysis in SPANISH.]\n\n"
391
+ : (data.preferredLanguage === 'en' ? "[INSTRUCTION: Provide all comments and aiAnalysis in English.]\n\n" : "");
392
+ return { content: [{ type: "text", text: langHint + JSON.stringify(data, null, 2) }] };
384
393
  }
385
394
  default:
386
395
  throw new Error("Unknown tool");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "viewgate-mcp",
3
- "version": "1.0.36",
3
+ "version": "1.0.37",
4
4
  "main": "dist/index.js",
5
5
  "bin": {
6
6
  "viewgate-mcp": "./dist/index.js"