openfox 1.6.88 → 1.6.91

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 (32) hide show
  1. package/dist/{auto-compaction-6A34RHDV.js → auto-compaction-I4YS2BN4.js} +5 -5
  2. package/dist/{chat-handler-6ATTKNZT.js → chat-handler-O4FNSVPI.js} +7 -7
  3. package/dist/{chunk-JDDNBK6T.js → chunk-A3YOBYWJ.js} +5 -5
  4. package/dist/{chunk-UEZDAB5X.js → chunk-CL2ZPJAG.js} +18 -8
  5. package/dist/{chunk-TLOL4I7K.js → chunk-H5T34J3H.js} +3 -3
  6. package/dist/{chunk-N7W42N5Y.js → chunk-HKCUSLQ5.js} +2 -2
  7. package/dist/{chunk-6GGYIEBM.js → chunk-II4UCFTE.js} +3 -3
  8. package/dist/{chunk-WSRF5L3S.js → chunk-MOQLMPTA.js} +2 -2
  9. package/dist/{chunk-RCECKE5L.js → chunk-PQCFNTFJ.js} +15 -9
  10. package/dist/{chunk-BZUNXVUJ.js → chunk-SSGVISQU.js} +7 -7
  11. package/dist/{chunk-YNIAFX24.js → chunk-STUSQVXQ.js} +4 -4
  12. package/dist/{chunk-QPOO2EM6.js → chunk-UQSL65WB.js} +130 -25
  13. package/dist/cli/dev.js +1 -1
  14. package/dist/cli/index.js +1 -1
  15. package/dist/{config-HMMPXQ46.js → config-GEDIDCBM.js} +5 -5
  16. package/dist/{orchestrator-YUAFANFC.js → orchestrator-LLOIG2CR.js} +6 -6
  17. package/dist/package.json +2 -2
  18. package/dist/{processor-4SOP4Q6S.js → processor-XL5NULQN.js} +2 -2
  19. package/dist/{provider-LDZFYLK6.js → provider-EV3KBC7Y.js} +7 -7
  20. package/dist/{serve-EJRMCF6B.js → serve-UWKYNKAO.js} +10 -10
  21. package/dist/server/index.d.ts +1 -0
  22. package/dist/server/index.js +8 -8
  23. package/dist/{service-TU4XSXYJ.js → service-3CLVG2HV.js} +20 -2
  24. package/dist/{settings-VTVOBDYG.js → settings-AYSWDZUI.js} +2 -2
  25. package/dist/{tools-7MGUWXDP.js → tools-ZBAAAOUH.js} +5 -5
  26. package/dist/{vision-fallback-WT66NURB.js → vision-fallback-4TAGWGVS.js} +2 -2
  27. package/dist/web/assets/{index-CF48Zu7j.css → index-CGEQK8Pf.css} +1 -1
  28. package/dist/web/assets/index-Cb7XVDFv.js +158 -0
  29. package/dist/web/index.html +2 -2
  30. package/dist/web/sw.js +1 -1
  31. package/package.json +2 -2
  32. package/dist/web/assets/index-DGidgYuL.js +0 -158
@@ -2,13 +2,13 @@ import {
2
2
  maybeAutoCompactContext,
3
3
  performManualContextCompaction,
4
4
  resolveCompactionStatsIdentity
5
- } from "./chunk-UEZDAB5X.js";
6
- import "./chunk-RCECKE5L.js";
5
+ } from "./chunk-CL2ZPJAG.js";
6
+ import "./chunk-PQCFNTFJ.js";
7
7
  import "./chunk-ZHBL5G5X.js";
8
8
  import "./chunk-DL6ZILAF.js";
9
9
  import "./chunk-PBGOZMVY.js";
10
10
  import "./chunk-VRGRAQDG.js";
11
- import "./chunk-YNIAFX24.js";
11
+ import "./chunk-STUSQVXQ.js";
12
12
  import "./chunk-6P5WQP6Y.js";
13
13
  import "./chunk-5GVCNVKV.js";
14
14
  import "./chunk-XVWVAWSG.js";
@@ -17,11 +17,11 @@ import "./chunk-BJYPTN5S.js";
17
17
  import "./chunk-ERFRUQQR.js";
18
18
  import "./chunk-CQGTEGKL.js";
19
19
  import "./chunk-B5AP3RSV.js";
20
- import "./chunk-WSRF5L3S.js";
20
+ import "./chunk-MOQLMPTA.js";
21
21
  import "./chunk-K44MW7JJ.js";
22
22
  export {
23
23
  maybeAutoCompactContext,
24
24
  performManualContextCompaction,
25
25
  resolveCompactionStatsIdentity
26
26
  };
27
- //# sourceMappingURL=auto-compaction-6A34RHDV.js.map
27
+ //# sourceMappingURL=auto-compaction-I4YS2BN4.js.map
@@ -8,14 +8,14 @@ import {
8
8
  } from "./chunk-DF5BZBP6.js";
9
9
  import {
10
10
  runChatTurn
11
- } from "./chunk-N7W42N5Y.js";
12
- import "./chunk-UEZDAB5X.js";
13
- import "./chunk-RCECKE5L.js";
11
+ } from "./chunk-HKCUSLQ5.js";
12
+ import "./chunk-CL2ZPJAG.js";
13
+ import "./chunk-PQCFNTFJ.js";
14
14
  import "./chunk-ZHBL5G5X.js";
15
15
  import "./chunk-DL6ZILAF.js";
16
16
  import "./chunk-PBGOZMVY.js";
17
17
  import "./chunk-VRGRAQDG.js";
18
- import "./chunk-YNIAFX24.js";
18
+ import "./chunk-STUSQVXQ.js";
19
19
  import {
20
20
  getEventStore
21
21
  } from "./chunk-6P5WQP6Y.js";
@@ -30,7 +30,7 @@ import "./chunk-BJYPTN5S.js";
30
30
  import "./chunk-ERFRUQQR.js";
31
31
  import "./chunk-CQGTEGKL.js";
32
32
  import "./chunk-B5AP3RSV.js";
33
- import "./chunk-WSRF5L3S.js";
33
+ import "./chunk-MOQLMPTA.js";
34
34
  import {
35
35
  logger
36
36
  } from "./chunk-K44MW7JJ.js";
@@ -61,7 +61,7 @@ async function startChatSession(sessionId, content, deps, options) {
61
61
  sessionManager.setRunning(sessionId, true);
62
62
  broadcastForSession(sessionId, createSessionRunningMessage(true));
63
63
  try {
64
- const { maybeAutoCompactContext } = await import("./auto-compaction-6A34RHDV.js");
64
+ const { maybeAutoCompactContext } = await import("./auto-compaction-I4YS2BN4.js");
65
65
  await maybeAutoCompactContext({
66
66
  sessionManager,
67
67
  sessionId,
@@ -175,4 +175,4 @@ export {
175
175
  startChatSession,
176
176
  stopSessionExecution
177
177
  };
178
- //# sourceMappingURL=chat-handler-6ATTKNZT.js.map
178
+ //# sourceMappingURL=chat-handler-O4FNSVPI.js.map
@@ -5,10 +5,10 @@ import {
5
5
  getBackendCapabilities,
6
6
  getModelProfile,
7
7
  mapFinishReason
8
- } from "./chunk-YNIAFX24.js";
8
+ } from "./chunk-STUSQVXQ.js";
9
9
  import {
10
10
  ensureVisionFallbackConfigLoaded
11
- } from "./chunk-WSRF5L3S.js";
11
+ } from "./chunk-MOQLMPTA.js";
12
12
  import {
13
13
  logger
14
14
  } from "./chunk-K44MW7JJ.js";
@@ -188,7 +188,7 @@ function createLLMClient(config, initialBackend = "unknown") {
188
188
  try {
189
189
  const shouldDisableThinking = disableThinking || request.disableThinking === true;
190
190
  await ensureVisionFallbackConfigLoaded();
191
- const { isVisionFallbackEnabled } = await import("./vision-fallback-WT66NURB.js");
191
+ const { isVisionFallbackEnabled } = await import("./vision-fallback-4TAGWGVS.js");
192
192
  const paramsOptions = {
193
193
  model,
194
194
  request,
@@ -265,7 +265,7 @@ function createLLMClient(config, initialBackend = "unknown") {
265
265
  });
266
266
  try {
267
267
  await ensureVisionFallbackConfigLoaded();
268
- const { isVisionFallbackEnabled } = await import("./vision-fallback-WT66NURB.js");
268
+ const { isVisionFallbackEnabled } = await import("./vision-fallback-4TAGWGVS.js");
269
269
  const shouldDisableThinking = disableThinking || request.disableThinking === true;
270
270
  const createParams = await buildStreamingCreateParams({
271
271
  model,
@@ -478,4 +478,4 @@ export {
478
478
  getLlmStatus,
479
479
  clearModelCache
480
480
  };
481
- //# sourceMappingURL=chunk-JDDNBK6T.js.map
481
+ //# sourceMappingURL=chunk-A3YOBYWJ.js.map
@@ -3,7 +3,7 @@ import {
3
3
  deleteSetting,
4
4
  getSetting,
5
5
  setSetting
6
- } from "./chunk-RCECKE5L.js";
6
+ } from "./chunk-PQCFNTFJ.js";
7
7
  import {
8
8
  getProject
9
9
  } from "./chunk-ZHBL5G5X.js";
@@ -28,7 +28,7 @@ import {
28
28
  getBackendCapabilities,
29
29
  getModelProfile,
30
30
  streamWithSegments
31
- } from "./chunk-YNIAFX24.js";
31
+ } from "./chunk-STUSQVXQ.js";
32
32
  import {
33
33
  getCurrentContextWindowId,
34
34
  getEventStore
@@ -513,6 +513,7 @@ function buildStreamRequestObject(params) {
513
513
  disableThinking,
514
514
  signal,
515
515
  modelSettings,
516
+ disableXmlProtection,
516
517
  onVisionFallbackStart,
517
518
  onVisionFallbackDone
518
519
  } = params;
@@ -522,7 +523,8 @@ function buildStreamRequestObject(params) {
522
523
  ...toolChoice && { toolChoice },
523
524
  disableThinking: disableThinking ?? false,
524
525
  ...signal && { signal },
525
- ...modelSettings && { modelSettings }
526
+ ...modelSettings && { modelSettings },
527
+ ...disableXmlProtection !== void 0 && { disableXmlProtection }
526
528
  };
527
529
  if (onVisionFallbackStart) streamRequest.onVisionFallbackStart = onVisionFallbackStart;
528
530
  if (onVisionFallbackDone) streamRequest.onVisionFallbackDone = onVisionFallbackDone;
@@ -587,7 +589,8 @@ async function* streamLLMPure(options) {
587
589
  signal,
588
590
  disableThinking,
589
591
  onVisionFallbackStart,
590
- onVisionFallbackDone
592
+ onVisionFallbackDone,
593
+ disableXmlProtection
591
594
  } = options;
592
595
  const llmMessages = [{ role: "system", content: systemPrompt }, ...messages];
593
596
  const profile = getModelProfile(llmClient.getModel());
@@ -622,6 +625,7 @@ async function* streamLLMPure(options) {
622
625
  disableThinking: disableThinking ?? false,
623
626
  signal,
624
627
  modelSettings: options.modelSettings,
628
+ ...disableXmlProtection !== void 0 && { disableXmlProtection },
625
629
  onVisionFallbackStart,
626
630
  onVisionFallbackDone
627
631
  });
@@ -1171,6 +1175,9 @@ function findAgentById(agentId, agents) {
1171
1175
  function getSubAgents(agents) {
1172
1176
  return agents.filter((a) => a.metadata.subagent);
1173
1177
  }
1178
+ function getTopLevelAgents(agents) {
1179
+ return agents.filter((a) => !a.metadata.subagent);
1180
+ }
1174
1181
  async function agentExists(configDir, agentId) {
1175
1182
  const agentsDir = getAgentsDir(configDir);
1176
1183
  const paths = getAgentFilePaths(agentsDir, agentId);
@@ -3187,6 +3194,7 @@ async function runTopLevelAgentLoop(config, turnMetrics) {
3187
3194
  };
3188
3195
  const previousContextTokens = sessionManager.getContextState(sessionId).currentTokens;
3189
3196
  const modelSettings = currentMaxTokensOverride !== void 0 ? { ...sessionManager.getCurrentModelSettings(), maxTokens: currentMaxTokensOverride } : sessionManager.getCurrentModelSettings();
3197
+ const disableXmlProtection = getSetting("llm.disableXmlProtection") === "true";
3190
3198
  const streamGen = streamLLMPure({
3191
3199
  messageId: assistantMsgId,
3192
3200
  systemPrompt: assembledRequest.systemPrompt,
@@ -3195,6 +3203,7 @@ async function runTopLevelAgentLoop(config, turnMetrics) {
3195
3203
  tools: toolRegistry.definitions,
3196
3204
  toolChoice: "auto",
3197
3205
  signal,
3206
+ disableXmlProtection,
3198
3207
  onVisionFallbackStart,
3199
3208
  onVisionFallbackDone,
3200
3209
  ...modelSettings && { modelSettings }
@@ -3793,7 +3802,7 @@ var callSubAgentTool = {
3793
3802
  };
3794
3803
  }
3795
3804
  try {
3796
- const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-7MGUWXDP.js");
3805
+ const { getToolRegistryForAgent: getToolRegistryForAgent2 } = await import("./tools-ZBAAAOUH.js");
3797
3806
  const toolRegistry = getToolRegistryForAgent2(agentDef);
3798
3807
  const turnMetrics = new TurnMetrics();
3799
3808
  const result = await executeSubAgent({
@@ -4290,7 +4299,7 @@ var devServerTool = createTool(
4290
4299
  type: "function",
4291
4300
  function: {
4292
4301
  name: "dev_server",
4293
- description: "Control the project dev server. Start, stop, restart, check status, or fetch logs with optional pagination. The dev server command and URL are configured in .openfox/dev-dev.json (dev mode) or .openfox/dev.json (prod).",
4302
+ description: "Control the project dev server. Start, stop, restart, check status, or fetch logs with optional pagination. The dev server is configured via .openfox/dev.json in the project root with fields: command (string, required), url (string, required), hotReload (boolean, optional, default false), disableInspect (boolean, optional, default false).",
4294
4303
  parameters: {
4295
4304
  type: "object",
4296
4305
  properties: {
@@ -4358,7 +4367,7 @@ var devServerTool = createTool(
4358
4367
  }
4359
4368
  if (!status.config) {
4360
4369
  return helpers.error(
4361
- 'No .openfox/dev-dev.json (dev mode) or .openfox/dev.json (prod) config found. Create one with:\n\n{\n "command": "npm run dev",\n "url": "http://localhost:3000",\n "hotReload": true\n}'
4370
+ 'No .openfox/dev.json config found in the project root. Create one with:\n\n{\n "command": "npm run dev",\n "url": "http://localhost:3000",\n "hotReload": true,\n "disableInspect": false\n}'
4362
4371
  );
4363
4372
  }
4364
4373
  return helpers.success(
@@ -4941,6 +4950,7 @@ export {
4941
4950
  getDefaultAgentContent,
4942
4951
  findAgentById,
4943
4952
  getSubAgents,
4953
+ getTopLevelAgents,
4944
4954
  agentExists,
4945
4955
  saveAgent,
4946
4956
  deleteAgent,
@@ -4983,4 +4993,4 @@ export {
4983
4993
  getToolRegistryForAgent,
4984
4994
  createToolRegistry
4985
4995
  };
4986
- //# sourceMappingURL=chunk-UEZDAB5X.js.map
4996
+ //# sourceMappingURL=chunk-CL2ZPJAG.js.map
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  detectModel
3
- } from "./chunk-JDDNBK6T.js";
3
+ } from "./chunk-A3YOBYWJ.js";
4
4
  import {
5
5
  detectBackend
6
- } from "./chunk-YNIAFX24.js";
6
+ } from "./chunk-STUSQVXQ.js";
7
7
  import {
8
8
  getGlobalConfigPath
9
9
  } from "./chunk-CQGTEGKL.js";
@@ -435,4 +435,4 @@ export {
435
435
  activateProvider,
436
436
  mergeConfigs
437
437
  };
438
- //# sourceMappingURL=chunk-TLOL4I7K.js.map
438
+ //# sourceMappingURL=chunk-H5T34J3H.js.map
@@ -13,7 +13,7 @@ import {
13
13
  getToolRegistryForAgent,
14
14
  loadAllAgentsDefault,
15
15
  runTopLevelAgentLoop
16
- } from "./chunk-UEZDAB5X.js";
16
+ } from "./chunk-CL2ZPJAG.js";
17
17
  import {
18
18
  getCurrentContextWindowId,
19
19
  getEventStore
@@ -327,4 +327,4 @@ export {
327
327
  runBuilderTurn,
328
328
  runVerifierTurn
329
329
  };
330
- //# sourceMappingURL=chunk-N7W42N5Y.js.map
330
+ //# sourceMappingURL=chunk-HKCUSLQ5.js.map
@@ -2,11 +2,11 @@ import {
2
2
  clearModelCache,
3
3
  createLLMClient,
4
4
  detectModel
5
- } from "./chunk-JDDNBK6T.js";
5
+ } from "./chunk-A3YOBYWJ.js";
6
6
  import {
7
7
  detectBackend,
8
8
  getModelProfile
9
- } from "./chunk-YNIAFX24.js";
9
+ } from "./chunk-STUSQVXQ.js";
10
10
  import {
11
11
  logger
12
12
  } from "./chunk-K44MW7JJ.js";
@@ -511,4 +511,4 @@ export {
511
511
  parseDefaultModelSelection,
512
512
  createProviderManager
513
513
  };
514
- //# sourceMappingURL=chunk-6GGYIEBM.js.map
514
+ //# sourceMappingURL=chunk-II4UCFTE.js.map
@@ -29,7 +29,7 @@ function isVisionFallbackEnabled() {
29
29
  async function ensureVisionFallbackConfigLoaded() {
30
30
  if (configLoaded) return;
31
31
  try {
32
- const { loadGlobalConfig, getVisionFallback } = await import("./config-HMMPXQ46.js");
32
+ const { loadGlobalConfig, getVisionFallback } = await import("./config-GEDIDCBM.js");
33
33
  const { getRuntimeConfig } = await import("./runtime-config-CBJJJGBD.js");
34
34
  const runtimeConfig = getRuntimeConfig();
35
35
  const mode = runtimeConfig.mode ?? "production";
@@ -137,4 +137,4 @@ export {
137
137
  describeImage,
138
138
  describeImageFromDataUrl
139
139
  };
140
- //# sourceMappingURL=chunk-WSRF5L3S.js.map
140
+ //# sourceMappingURL=chunk-MOQLMPTA.js.map
@@ -11,7 +11,8 @@ var SETTINGS_KEYS = {
11
11
  DISPLAY_SHOW_AGENT_DEFINITIONS: "display.showAgentDefinitions",
12
12
  DISPLAY_SHOW_WORKFLOW_BARS: "display.showWorkflowBars",
13
13
  DISPLAY_THEME: "display.theme",
14
- DISPLAY_USER_PRESETS: "display.userPresets"
14
+ DISPLAY_USER_PRESETS: "display.userPresets",
15
+ LLM_DISABLE_XML_PROTECTION: "llm.disableXmlProtection"
15
16
  };
16
17
  var SETTINGS_DEFAULTS = {
17
18
  [SETTINGS_KEYS.DISPLAY_SHOW_THINKING]: "true",
@@ -19,16 +20,21 @@ var SETTINGS_DEFAULTS = {
19
20
  [SETTINGS_KEYS.DISPLAY_SHOW_STATS]: "true",
20
21
  [SETTINGS_KEYS.DISPLAY_SHOW_AGENT_DEFINITIONS]: "true",
21
22
  [SETTINGS_KEYS.DISPLAY_SHOW_WORKFLOW_BARS]: "true",
22
- [SETTINGS_KEYS.DISPLAY_THEME]: JSON.stringify({ preset: "dark" })
23
+ [SETTINGS_KEYS.DISPLAY_THEME]: JSON.stringify({ preset: "dark" }),
24
+ [SETTINGS_KEYS.LLM_DISABLE_XML_PROTECTION]: "false"
23
25
  };
24
26
  function getSetting(key) {
25
- const db = getDatabase();
26
- const row = db.prepare(
27
+ try {
28
+ const db = getDatabase();
29
+ const row = db.prepare(
30
+ `
31
+ SELECT value FROM settings WHERE key = ?
27
32
  `
28
- SELECT value FROM settings WHERE key = ?
29
- `
30
- ).get(key);
31
- return row?.value ?? null;
33
+ ).get(key);
34
+ return row?.value ?? null;
35
+ } catch {
36
+ return null;
37
+ }
32
38
  }
33
39
  function setSetting(key, value) {
34
40
  const db = getDatabase();
@@ -63,4 +69,4 @@ export {
63
69
  deleteSetting,
64
70
  getAllSettings
65
71
  };
66
- //# sourceMappingURL=chunk-RCECKE5L.js.map
72
+ //# sourceMappingURL=chunk-PQCFNTFJ.js.map
@@ -33,7 +33,7 @@ Options:
33
33
  }
34
34
  async function runNetworkSetup(mode) {
35
35
  const { loadAuthConfig, saveAuthConfig, encryptPassword } = await import("./auth-56SIRACI.js");
36
- const { saveGlobalConfig } = await import("./config-HMMPXQ46.js");
36
+ const { saveGlobalConfig } = await import("./config-GEDIDCBM.js");
37
37
  const { getAuthKeyPath } = await import("./paths-X46PPOI2.js");
38
38
  const existingAuth = await loadAuthConfig(mode);
39
39
  if (existingAuth) {
@@ -94,7 +94,7 @@ async function runNetworkSetup(mode) {
94
94
  console.log("\u2713 Configuration saved!\n");
95
95
  }
96
96
  async function runConfig(mode) {
97
- const { loadGlobalConfig, getActiveProvider, getDefaultModel } = await import("./config-HMMPXQ46.js");
97
+ const { loadGlobalConfig, getActiveProvider, getDefaultModel } = await import("./config-GEDIDCBM.js");
98
98
  const { getGlobalConfigPath } = await import("./paths-X46PPOI2.js");
99
99
  const config = await loadGlobalConfig(mode);
100
100
  const configPath = getGlobalConfigPath(mode);
@@ -149,13 +149,13 @@ async function runCli(options) {
149
149
  break;
150
150
  }
151
151
  case "provider": {
152
- const { runProviderCommand } = await import("./provider-LDZFYLK6.js");
152
+ const { runProviderCommand } = await import("./provider-EV3KBC7Y.js");
153
153
  const [, subcommand] = positionals;
154
154
  await runProviderCommand(mode, subcommand);
155
155
  break;
156
156
  }
157
157
  case "service": {
158
- const { runServiceCommand } = await import("./service-TU4XSXYJ.js");
158
+ const { runServiceCommand } = await import("./service-3CLVG2HV.js");
159
159
  const [, subcommand] = positionals;
160
160
  if (subcommand === "--help" || subcommand === "-h" || values.help) {
161
161
  runServiceCommand(mode, void 0);
@@ -185,12 +185,12 @@ async function runCli(options) {
185
185
  break;
186
186
  }
187
187
  default: {
188
- const { configFileExists } = await import("./config-HMMPXQ46.js");
188
+ const { configFileExists } = await import("./config-GEDIDCBM.js");
189
189
  const configExists = await configFileExists(mode);
190
190
  if (!configExists) {
191
191
  await runNetworkSetup(mode);
192
192
  }
193
- const { runServe } = await import("./serve-EJRMCF6B.js");
193
+ const { runServe } = await import("./serve-UWKYNKAO.js");
194
194
  const serveOptions = { mode };
195
195
  if (values.port) serveOptions.port = parseInt(values.port);
196
196
  if (values["no-browser"] === true) serveOptions.openBrowser = false;
@@ -202,4 +202,4 @@ async function runCli(options) {
202
202
  export {
203
203
  runCli
204
204
  };
205
- //# sourceMappingURL=chunk-BZUNXVUJ.js.map
205
+ //# sourceMappingURL=chunk-SSGVISQU.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  describeImageFromDataUrl
3
- } from "./chunk-WSRF5L3S.js";
3
+ } from "./chunk-MOQLMPTA.js";
4
4
  import {
5
5
  logger
6
6
  } from "./chunk-K44MW7JJ.js";
@@ -714,7 +714,7 @@ async function* streamWithSegments(client, request) {
714
714
  flushThinking();
715
715
  content += event.content;
716
716
  currentTextSegment += event.content;
717
- if (hasXmlToolPattern(content)) {
717
+ if (!request.disableXmlProtection && hasXmlToolPattern(content)) {
718
718
  xmlAbortController.abort();
719
719
  yield { type: "xml_tool_abort" };
720
720
  return null;
@@ -728,7 +728,7 @@ async function* streamWithSegments(client, request) {
728
728
  flushText();
729
729
  thinkingContent += event.content;
730
730
  currentThinkingSegment += event.content;
731
- if (hasXmlToolPattern(thinkingContent)) {
731
+ if (!request.disableXmlProtection && hasXmlToolPattern(thinkingContent)) {
732
732
  xmlAbortController.abort();
733
733
  yield { type: "xml_tool_abort" };
734
734
  return null;
@@ -801,4 +801,4 @@ export {
801
801
  extractThinking,
802
802
  streamWithSegments
803
803
  };
804
- //# sourceMappingURL=chunk-YNIAFX24.js.map
804
+ //# sourceMappingURL=chunk-STUSQVXQ.js.map