@bamptee/aia-code 0.4.0 → 0.5.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
CHANGED
|
@@ -8,10 +8,10 @@ export async function generate(prompt, model, { verbose = false, apply = false }
|
|
|
8
8
|
if (apply) {
|
|
9
9
|
args.push('--allowedTools', 'Edit', 'Write', 'Bash', 'Read', 'Glob', 'Grep');
|
|
10
10
|
}
|
|
11
|
-
if (verbose) {
|
|
11
|
+
if (verbose || apply) {
|
|
12
12
|
args.push('--verbose');
|
|
13
13
|
}
|
|
14
14
|
args.push('-');
|
|
15
15
|
|
|
16
|
-
return runCli('claude', args, { stdin: prompt, verbose });
|
|
16
|
+
return runCli('claude', args, { stdin: prompt, verbose: verbose || apply, apply });
|
|
17
17
|
}
|
|
@@ -2,8 +2,12 @@ import { spawn } from 'node:child_process';
|
|
|
2
2
|
import chalk from 'chalk';
|
|
3
3
|
|
|
4
4
|
const DEFAULT_IDLE_TIMEOUT_MS = 180_000;
|
|
5
|
+
const AGENT_IDLE_TIMEOUT_MS = 600_000;
|
|
5
6
|
|
|
6
|
-
export function runCli(command, args, { stdin: stdinData, verbose = false,
|
|
7
|
+
export function runCli(command, args, { stdin: stdinData, verbose = false, apply = false, idleTimeoutMs } = {}) {
|
|
8
|
+
if (!idleTimeoutMs) {
|
|
9
|
+
idleTimeoutMs = apply ? AGENT_IDLE_TIMEOUT_MS : DEFAULT_IDLE_TIMEOUT_MS;
|
|
10
|
+
}
|
|
7
11
|
return new Promise((resolve, reject) => {
|
|
8
12
|
const child = spawn(command, args, {
|
|
9
13
|
stdio: ['pipe', 'pipe', 'pipe'],
|
package/src/providers/gemini.js
CHANGED
package/src/providers/openai.js
CHANGED
|
@@ -6,9 +6,9 @@ export async function generate(prompt, model, { verbose = false, apply = false }
|
|
|
6
6
|
args.push('-c', `model="${model}"`);
|
|
7
7
|
}
|
|
8
8
|
if (apply) {
|
|
9
|
-
args.push('-c', 'approval_policy="
|
|
9
|
+
args.push('-c', 'approval_policy="on-failure"');
|
|
10
10
|
}
|
|
11
11
|
args.push('-');
|
|
12
12
|
|
|
13
|
-
return runCli('codex', args, { stdin: prompt, verbose });
|
|
13
|
+
return runCli('codex', args, { stdin: prompt, verbose: verbose || apply, apply });
|
|
14
14
|
}
|