donsetch 2.4.0 → 2.4.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/package.json +1 -1
- package/pi-extension.ts +9 -1
package/package.json
CHANGED
package/pi-extension.ts
CHANGED
|
@@ -385,7 +385,15 @@ export default function (pi: ExtensionAPI) {
|
|
|
385
385
|
|
|
386
386
|
try {
|
|
387
387
|
const result = await callMcpTool(toolName, params);
|
|
388
|
-
|
|
388
|
+
// Join all content text blocks, skipping [meta] blocks.
|
|
389
|
+
// [meta] blocks contain compact metadata for clients
|
|
390
|
+
// (Claude Code, VSCode) that drop text when
|
|
391
|
+
// structuredContent is present. Pi reads structuredContent
|
|
392
|
+
// directly for details, so meta blocks are redundant here.
|
|
393
|
+
const text = (result?.content ?? [])
|
|
394
|
+
.map((b: any) => b?.text ?? "")
|
|
395
|
+
.filter((t: string) => !t.startsWith("[meta]"))
|
|
396
|
+
.join("") || "";
|
|
389
397
|
const isErr = result?.isError ?? false;
|
|
390
398
|
const sc = result?.structuredContent ?? null;
|
|
391
399
|
|