We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e22cb86 commit b0a36a1Copy full SHA for b0a36a1
1 file changed
global-template/docgen/test/fixtures/fake-provider.mjs
@@ -2,6 +2,13 @@
2
import fs from 'node:fs';
3
import path from 'node:path';
4
5
+const maxTurnsIndex = process.argv.indexOf('--max-turns');
6
+const maxTurns = maxTurnsIndex >= 0 ? Number(process.argv[maxTurnsIndex + 1]) : 0;
7
+if (!Number.isFinite(maxTurns) || maxTurns < 30) {
8
+ console.error(`Warning: Reached maximum conversation turns (${maxTurns || 'missing'}). Retry with --max-turns 30.`);
9
+ process.exit(8);
10
+}
11
+
12
const prompt = fs.readFileSync(0, 'utf8');
13
const stage = process.env.DOCGEN_STAGE;
14
const cwd = process.cwd();
0 commit comments