@ai-sdk-tool/parser 3.0.0-canary.2 → 3.0.0-canary.3

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/dist/community.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  createToolMiddleware,
3
3
  morphXmlProtocol
4
- } from "./chunk-LB5ALTRD.js";
4
+ } from "./chunk-2B2YNKXY.js";
5
5
 
6
6
  // src/community/sijawara.ts
7
7
  var sijawaraDetailedXmlToolMiddleware = createToolMiddleware({
package/dist/index.cjs CHANGED
@@ -2320,6 +2320,26 @@ var morphXmlProtocol = (protocolOptions) => {
2320
2320
  seen.add(key);
2321
2321
  return true;
2322
2322
  }).sort((a, b) => a.startIndex - b.startIndex);
2323
+ if (process.env.DEBUG_PARSER_OUTPUT === "true") {
2324
+ console.log("\n=== PARSER DEBUG ===");
2325
+ console.log(`Available tools: ${toolNames.join(", ")}`);
2326
+ console.log(`Full text length: ${text.length}`);
2327
+ console.log(`Full text:
2328
+ ${text}
2329
+ `);
2330
+ console.log(`Tool calls found: ${toolCalls.length}`);
2331
+ for (let i = 0; i < toolCalls.length; i++) {
2332
+ const tc = toolCalls[i];
2333
+ console.log(`
2334
+ [Tool Call ${i + 1}] ${tc.toolName}`);
2335
+ console.log(`Position: ${tc.startIndex} - ${tc.endIndex}`);
2336
+ console.log(`Segment:
2337
+ ${tc.segment}`);
2338
+ console.log(`Content:
2339
+ ${tc.content}`);
2340
+ }
2341
+ console.log("===================\n");
2342
+ }
2323
2343
  for (const toolCall of toolCalls) {
2324
2344
  currentIndex = processTextBeforeToolCall(
2325
2345
  text,