sonance-brand-mcp 1.3.45 → 1.3.46
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.
|
@@ -475,7 +475,7 @@ Return search/replace patches (NOT full files). The system applies your patches
|
|
|
475
475
|
- Blaze Blue: #00A3E1
|
|
476
476
|
|
|
477
477
|
**RESPONSE FORMAT:**
|
|
478
|
-
Return ONLY
|
|
478
|
+
CRITICAL: Return ONLY the JSON object below. Do NOT include any text, explanation, or thinking before or after the JSON. No preamble. No "Looking at the screenshot..." No markdown code blocks. Just raw JSON:
|
|
479
479
|
{
|
|
480
480
|
"reasoning": "What you understood from the request and your plan",
|
|
481
481
|
"modifications": [
|
|
@@ -863,6 +863,15 @@ CRITICAL: Edit the TARGET COMPONENT (marked with ***), not the page wrapper.`;
|
|
|
863
863
|
}
|
|
864
864
|
|
|
865
865
|
jsonText = jsonText.trim();
|
|
866
|
+
|
|
867
|
+
// Robust JSON extraction: find the first { and last } to extract JSON object
|
|
868
|
+
// This handles cases where the LLM includes preamble text before the JSON
|
|
869
|
+
const firstBrace = jsonText.indexOf('{');
|
|
870
|
+
const lastBrace = jsonText.lastIndexOf('}');
|
|
871
|
+
if (firstBrace !== -1 && lastBrace > firstBrace) {
|
|
872
|
+
jsonText = jsonText.substring(firstBrace, lastBrace + 1);
|
|
873
|
+
}
|
|
874
|
+
|
|
866
875
|
aiResponse = JSON.parse(jsonText);
|
|
867
876
|
} catch {
|
|
868
877
|
console.error("Failed to parse AI response:", textResponse.text);
|
|
@@ -473,7 +473,7 @@ Return search/replace patches (NOT full files). The system applies your patches
|
|
|
473
473
|
- Blaze Blue: #00A3E1
|
|
474
474
|
|
|
475
475
|
**RESPONSE FORMAT:**
|
|
476
|
-
Return ONLY
|
|
476
|
+
CRITICAL: Return ONLY the JSON object below. Do NOT include any text, explanation, or thinking before or after the JSON. No preamble. No "Looking at the screenshot..." No markdown code blocks. Just raw JSON:
|
|
477
477
|
{
|
|
478
478
|
"reasoning": "What you understood from the request and your plan",
|
|
479
479
|
"modifications": [
|
|
@@ -878,6 +878,14 @@ CRITICAL: Edit the TARGET COMPONENT (marked with ***), not the page wrapper.`;
|
|
|
878
878
|
// Clean up any remaining whitespace
|
|
879
879
|
jsonText = jsonText.trim();
|
|
880
880
|
|
|
881
|
+
// Robust JSON extraction: find the first { and last } to extract JSON object
|
|
882
|
+
// This handles cases where the LLM includes preamble text before the JSON
|
|
883
|
+
const firstBrace = jsonText.indexOf('{');
|
|
884
|
+
const lastBrace = jsonText.lastIndexOf('}');
|
|
885
|
+
if (firstBrace !== -1 && lastBrace > firstBrace) {
|
|
886
|
+
jsonText = jsonText.substring(firstBrace, lastBrace + 1);
|
|
887
|
+
}
|
|
888
|
+
|
|
881
889
|
aiResponse = JSON.parse(jsonText);
|
|
882
890
|
} catch {
|
|
883
891
|
console.error("Failed to parse AI response:", textResponse.text);
|
|
@@ -2370,7 +2370,7 @@ export function SonanceDevTools() {
|
|
|
2370
2370
|
<div
|
|
2371
2371
|
ref={headerRef}
|
|
2372
2372
|
className={cn(
|
|
2373
|
-
"flex items-center justify-between px-
|
|
2373
|
+
"flex items-center justify-between px-3 py-2 border-b border-gray-200 bg-[#333F48]",
|
|
2374
2374
|
"cursor-move touch-none"
|
|
2375
2375
|
)}
|
|
2376
2376
|
onPointerDown={handleDragStart}
|
|
@@ -2380,10 +2380,10 @@ export function SonanceDevTools() {
|
|
|
2380
2380
|
onDoubleClick={handleResetPosition}
|
|
2381
2381
|
title="Drag to move • Double-click to reset position"
|
|
2382
2382
|
>
|
|
2383
|
-
<div className="flex items-center gap-
|
|
2384
|
-
<GripHorizontal className="h-
|
|
2385
|
-
<Palette className="h-
|
|
2386
|
-
<span id="span-sonance-devtools" className="text-
|
|
2383
|
+
<div className="flex items-center gap-1.5">
|
|
2384
|
+
<GripHorizontal className="h-3.5 w-3.5 text-white/50" />
|
|
2385
|
+
<Palette className="h-4 w-4 text-[#00A3E1]" />
|
|
2386
|
+
<span id="span-sonance-devtools" className="text-xs font-semibold text-white whitespace-nowrap">
|
|
2387
2387
|
Sonance DevTools
|
|
2388
2388
|
</span>
|
|
2389
2389
|
</div>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sonance-brand-mcp",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.46",
|
|
4
4
|
"description": "MCP Server for Sonance Brand Guidelines and Component Library - gives Claude instant access to brand colors, typography, and UI components.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"type": "module",
|