drafted 1.2.0 → 1.2.1
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/mcp/server.mjs +17 -2
- package/package.json +1 -1
package/mcp/server.mjs
CHANGED
|
@@ -1071,8 +1071,23 @@ tool('frame', 'Frame CRUD in the ACTIVE PROJECT. Dispatch by `action`: read (by
|
|
|
1071
1071
|
if (!lines && result.ok && result.id) {
|
|
1072
1072
|
readFrameIds.add(result.id);
|
|
1073
1073
|
}
|
|
1074
|
-
|
|
1075
|
-
|
|
1074
|
+
// Surface content as the visible text. Some Claude clients prefer
|
|
1075
|
+
// structuredContent over text when both are present and structured looks
|
|
1076
|
+
// "complete" — so include content in BOTH places to ensure the agent
|
|
1077
|
+
// can always see the frame's actual content, not just metadata.
|
|
1078
|
+
const structured = frameStructuredContent(result);
|
|
1079
|
+
structured.content = result.content ?? '';
|
|
1080
|
+
structured.size = result.size;
|
|
1081
|
+
structured.totalLines = result.totalLines;
|
|
1082
|
+
const visibleText = JSON.stringify({
|
|
1083
|
+
path: result.path,
|
|
1084
|
+
contentType: result.contentType,
|
|
1085
|
+
size: result.size,
|
|
1086
|
+
totalLines: result.totalLines,
|
|
1087
|
+
content: result.content ?? '',
|
|
1088
|
+
}, null, 2);
|
|
1089
|
+
return ok(visibleText, {
|
|
1090
|
+
structuredContent: structured,
|
|
1076
1091
|
_meta: { frameHtml: result.content },
|
|
1077
1092
|
});
|
|
1078
1093
|
}
|