v2.2.0: Rewritten build pipeline (18 bugs fixed), auto-install tools, IDE-like agentic loop, 5min timeout

This commit is contained in:
admin
2026-05-19 19:26:29 +04:00
Unverified
parent 5997eee0d7
commit 538505e38b
6 changed files with 186 additions and 60 deletions

View File

@@ -7,8 +7,8 @@ android {
applicationId "ai.z.chat"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 12
versionName "2.1.0"
versionCode 13
versionName "2.2.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
aaptOptions {
ignoreAssetsPattern = '!.svn:!.git:!.ds_store:!*.scc:.*:!CVS:!thumbs.db:!picasa.ini:!*~'

View File

@@ -60,7 +60,7 @@ public class ShellPlugin extends Plugin {
String command = call.getString("command", "");
String cwd = call.getString("cwd", currentCwd);
boolean stream = call.getBoolean("stream", false);
int timeout = call.getInt("timeout", 30000);
int timeout = call.getInt("timeout", 300000);
if (command.isEmpty()) {
call.reject("No command provided");
@@ -122,11 +122,11 @@ public class ShellPlugin extends Plugin {
@PluginMethod
public void getEnv(PluginCall call) {
JSObject env = new JSObject();
env.put("HOME", homeDir);
env.put("HOME", homeDir + "/home");
env.put("TOOLS", toolsDir);
env.put("PROJECTS", projectsDir);
env.put("CWD", currentCwd);
env.put("PREFIX", homeDir + "/tools/usr");
env.put("PREFIX", prefixDir);
call.resolve(env);
}
@@ -308,7 +308,13 @@ public class ShellPlugin extends Plugin {
}
boolean finished = process.waitFor(timeout / 1000, java.util.concurrent.TimeUnit.SECONDS);
int exitCode = finished ? process.exitValue() : -1;
int exitCode;
if (finished) {
exitCode = process.exitValue();
} else {
process.destroyForcibly();
exitCode = -1;
}
activeProcesses.remove(processId);