@probelabs/probe 0.6.0-rc260 → 0.6.0-rc262
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/bin/binaries/probe-v0.6.0-rc262-aarch64-apple-darwin.tar.gz +0 -0
- package/bin/binaries/probe-v0.6.0-rc262-aarch64-unknown-linux-musl.tar.gz +0 -0
- package/bin/binaries/probe-v0.6.0-rc262-x86_64-apple-darwin.tar.gz +0 -0
- package/bin/binaries/probe-v0.6.0-rc262-x86_64-pc-windows-msvc.zip +0 -0
- package/bin/binaries/probe-v0.6.0-rc262-x86_64-unknown-linux-musl.tar.gz +0 -0
- package/build/agent/index.js +217 -233
- package/build/agent/xmlParsingUtils.js +6 -4
- package/cjs/agent/ProbeAgent.cjs +311 -289
- package/cjs/index.cjs +311 -289
- package/package.json +1 -1
- package/src/agent/xmlParsingUtils.js +6 -4
- package/bin/binaries/probe-v0.6.0-rc260-aarch64-apple-darwin.tar.gz +0 -0
- package/bin/binaries/probe-v0.6.0-rc260-aarch64-unknown-linux-musl.tar.gz +0 -0
- package/bin/binaries/probe-v0.6.0-rc260-x86_64-apple-darwin.tar.gz +0 -0
- package/bin/binaries/probe-v0.6.0-rc260-x86_64-pc-windows-msvc.zip +0 -0
- package/bin/binaries/probe-v0.6.0-rc260-x86_64-unknown-linux-musl.tar.gz +0 -0
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@ import { DEFAULT_VALID_TOOLS, buildToolTagPattern } from '../tools/common.js';
|
|
|
11
11
|
* @param {string} xmlString - The XML string to clean
|
|
12
12
|
* @returns {string} - Cleaned XML string without thinking tags
|
|
13
13
|
*/
|
|
14
|
-
export function removeThinkingTags(xmlString) {
|
|
14
|
+
export function removeThinkingTags(xmlString, validTools = DEFAULT_VALID_TOOLS) {
|
|
15
15
|
let result = xmlString;
|
|
16
16
|
|
|
17
17
|
// Remove all properly closed thinking tags first
|
|
@@ -26,8 +26,8 @@ export function removeThinkingTags(xmlString) {
|
|
|
26
26
|
const afterThinking = result.substring(thinkingIndex + '<thinking>'.length);
|
|
27
27
|
|
|
28
28
|
// Look for any tool tags in the remaining content
|
|
29
|
-
// Use the
|
|
30
|
-
const toolPattern = buildToolTagPattern(
|
|
29
|
+
// Use the provided valid tools list to build the pattern dynamically
|
|
30
|
+
const toolPattern = buildToolTagPattern(validTools);
|
|
31
31
|
const toolMatch = afterThinking.match(toolPattern);
|
|
32
32
|
|
|
33
33
|
if (toolMatch) {
|
|
@@ -201,7 +201,9 @@ export function processXmlWithThinkingAndRecovery(xmlString, validTools = []) {
|
|
|
201
201
|
const thinkingContent = extractThinkingContent(xmlString);
|
|
202
202
|
|
|
203
203
|
// Remove thinking tags and their content from the XML string
|
|
204
|
-
|
|
204
|
+
// Forward validTools so that tool tags (e.g. edit, create) inside unclosed
|
|
205
|
+
// thinking blocks are preserved when they are in the valid tools list
|
|
206
|
+
const cleanedXmlString = removeThinkingTags(xmlString, validTools.length > 0 ? validTools : undefined);
|
|
205
207
|
|
|
206
208
|
// Check for attempt_complete recovery patterns
|
|
207
209
|
const recoveryResult = checkAttemptCompleteRecovery(cleanedXmlString, validTools);
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|