@vtstech/pi-react-fallback 1.0.9 → 1.1.0
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 +2 -2
- package/react-fallback.js +5 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vtstech/pi-react-fallback",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "ReAct fallback extension for Pi Coding Agent",
|
|
5
5
|
"main": "react-fallback.js",
|
|
6
6
|
"keywords": ["pi-extensions"],
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"url": "https://github.com/VTSTech/pi-coding-agent"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@vtstech/pi-shared": "1.0
|
|
17
|
+
"@vtstech/pi-shared": "1.1.0"
|
|
18
18
|
},
|
|
19
19
|
"peerDependencies": {
|
|
20
20
|
"@mariozechner/pi-coding-agent": ">=0.66"
|
package/react-fallback.js
CHANGED
|
@@ -3,6 +3,7 @@ import os from "node:os";
|
|
|
3
3
|
import * as fs from "node:fs";
|
|
4
4
|
import * as path from "node:path";
|
|
5
5
|
import { section, ok, fail, warn, info } from "@vtstech/pi-shared/format";
|
|
6
|
+
import { EXTENSION_VERSION } from "@vtstech/pi-shared/ollama";
|
|
6
7
|
function sanitizeModelJson(text) {
|
|
7
8
|
text = text.replace(/:\s*True\b/g, ": true");
|
|
8
9
|
text = text.replace(/:\s*False\b/g, ": false");
|
|
@@ -390,7 +391,7 @@ function react_fallback_temp_default(pi2) {
|
|
|
390
391
|
let reactModeEnabled = readReactConfig().enabled;
|
|
391
392
|
let stats = { bridgeCalls: 0, fuzzyMatches: 0, argNormalizations: 0, parseFailures: 0 };
|
|
392
393
|
const branding = [
|
|
393
|
-
` \u26A1 Pi ReAct Fallback Extension
|
|
394
|
+
` \u26A1 Pi ReAct Fallback Extension v${EXTENSION_VERSION}`,
|
|
394
395
|
` Written by VTSTech`,
|
|
395
396
|
` GitHub: https://github.com/VTSTech`,
|
|
396
397
|
` Website: www.vts-tech.org`
|
|
@@ -562,8 +563,9 @@ ${argsJson}`
|
|
|
562
563
|
if (looksLikeSchemaDump(text)) {
|
|
563
564
|
lines.push(warn("Text appears to be a tool schema dump (not a tool call)"));
|
|
564
565
|
}
|
|
565
|
-
|
|
566
|
-
|
|
566
|
+
const faMatch = FINAL_ANSWER_RE.exec(text);
|
|
567
|
+
if (faMatch) {
|
|
568
|
+
const fa = faMatch[1].trim();
|
|
567
569
|
lines.push(ok(`Final Answer: ${fa}`));
|
|
568
570
|
}
|
|
569
571
|
pi2.sendMessage({
|