cc-reviewer 1.5.0 → 1.5.1
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/adapters/codex.js
CHANGED
|
@@ -228,12 +228,17 @@ export class CodexAdapter {
|
|
|
228
228
|
if (schemaFile) {
|
|
229
229
|
args.push('--output-schema', schemaFile);
|
|
230
230
|
}
|
|
231
|
-
|
|
231
|
+
// Use '-' to read prompt from stdin — more stable for complex prompts
|
|
232
|
+
// with newlines, backticks, JSON templates, etc.
|
|
233
|
+
args.push('-');
|
|
232
234
|
const proc = spawn('codex', args, {
|
|
233
235
|
cwd: workingDir,
|
|
234
|
-
stdio: ['
|
|
236
|
+
stdio: ['pipe', 'pipe', 'pipe'], // stdin is pipe for prompt delivery
|
|
235
237
|
env: { ...process.env }
|
|
236
238
|
});
|
|
239
|
+
// Deliver prompt via stdin
|
|
240
|
+
proc.stdin.write(prompt);
|
|
241
|
+
proc.stdin.end();
|
|
237
242
|
let stdout = '';
|
|
238
243
|
let stderr = '';
|
|
239
244
|
let truncated = false;
|
package/dist/adapters/gemini.js
CHANGED
|
@@ -202,18 +202,22 @@ export class GeminiAdapter {
|
|
|
202
202
|
}
|
|
203
203
|
runCli(prompt, workingDir) {
|
|
204
204
|
return new Promise((resolve, reject) => {
|
|
205
|
-
// Gemini CLI uses
|
|
205
|
+
// Gemini CLI uses --yolo for auto-approval, prompt passed via stdin
|
|
206
|
+
// to avoid escaping issues with complex prompts containing newlines,
|
|
207
|
+
// backticks, JSON templates, etc.
|
|
206
208
|
const args = [
|
|
207
209
|
'--yolo',
|
|
208
210
|
'--output-format', 'json', // Force JSON output
|
|
209
211
|
'--include-directories', workingDir,
|
|
210
|
-
prompt
|
|
211
212
|
];
|
|
212
213
|
const proc = spawn('gemini', args, {
|
|
213
214
|
cwd: workingDir,
|
|
214
|
-
stdio: ['
|
|
215
|
+
stdio: ['pipe', 'pipe', 'pipe'], // stdin is pipe for prompt delivery
|
|
215
216
|
env: { ...process.env }
|
|
216
217
|
});
|
|
218
|
+
// Deliver prompt via stdin — more stable than args for complex content
|
|
219
|
+
proc.stdin.write(prompt);
|
|
220
|
+
proc.stdin.end();
|
|
217
221
|
let stdout = '';
|
|
218
222
|
let stderr = '';
|
|
219
223
|
let truncated = false;
|