donsetch 2.3.9 → 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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/pi-extension.ts +9 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "donsetch",
3
- "version": "2.3.9",
3
+ "version": "2.4.1",
4
4
  "description": "Web fetch, search and crawl for AI agents. Zero API keys. Chrome-true TLS.",
5
5
  "license": "AGPL-3.0-only",
6
6
  "author": "Bishesh Bhandari",
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
- const text = result?.content?.[0]?.text ?? "";
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