polydev-ai 1.8.29 → 1.8.30
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/lib/cliManager.js +7 -0
- package/package.json +1 -1
package/lib/cliManager.js
CHANGED
|
@@ -1069,14 +1069,21 @@ This is a known issue with @google/gemini-cli@0.3.4 and older Node.js versions.`
|
|
|
1069
1069
|
const parseCodexOutput = (output) => {
|
|
1070
1070
|
if (!output || !output.trim()) return null;
|
|
1071
1071
|
|
|
1072
|
+
// DEBUG: Log raw output for troubleshooting
|
|
1073
|
+
console.log('[CLI Debug] parseCodexOutput raw input length:', output.length);
|
|
1074
|
+
console.log('[CLI Debug] parseCodexOutput raw input (first 500 chars):', output.substring(0, 500));
|
|
1075
|
+
|
|
1072
1076
|
// First, try to extract the response between "codex" marker and "tokens used"
|
|
1073
1077
|
// This is the most reliable pattern for Codex CLI output
|
|
1074
1078
|
const codexMarkerMatch = output.match(/\bcodex\s*\n([\s\S]*?)(?:\n\s*tokens used|\n\s*$)/i);
|
|
1075
1079
|
if (codexMarkerMatch && codexMarkerMatch[1]) {
|
|
1076
1080
|
const extracted = codexMarkerMatch[1].trim();
|
|
1081
|
+
console.log('[CLI Debug] codexMarkerMatch found:', JSON.stringify(extracted));
|
|
1077
1082
|
if (extracted.length > 0 && !extracted.startsWith('ERROR')) {
|
|
1078
1083
|
return extracted;
|
|
1079
1084
|
}
|
|
1085
|
+
} else {
|
|
1086
|
+
console.log('[CLI Debug] No codexMarkerMatch found');
|
|
1080
1087
|
}
|
|
1081
1088
|
|
|
1082
1089
|
// Fallback: Try to find bullet point responses
|
package/package.json
CHANGED