fix(agent): switching harness clears the previous harness's setup results

This commit is contained in:
Kurt Himebauch committed 2026-11-10 00:40:35 -05:00
1 parent d44bf32ae8
commit 5d25f79fa7
2 files changed
+7

No files matched your search

@@ -73,6 +73,7 @@ object AgentHost {
fun choose(context: Context, choice: AgentHarness) {
if (choice == harness || state == State.WORKING) return
forget(context)
AgentSetup.forget()
prefs(context).edit().putString(HARNESS_KEY, choice.id).apply()
refresh(context)
}
@@ -101,6 +101,12 @@ object AgentSetup {
}, "agent-setup-${step.name.lowercase()}").start()
}
/** Drops what the checks found, which belonged to the previous harness. */
fun forget() {
status.clear()
detail.clear()
}
private fun probe(app: Context, step: Step, command: List<String>) {
var output = ""
val ok = runCatching {