mirror of
https://github.com/jparkerweb/plan2code.git
synced 2026-11-29 05:11:19 -08:00
Add the Review Loop: unattended review-and-fix rounds in the desktop app and in loop phases
AI Assisted
This commit is contained in:
1 parent
d6a28b5dc8
commit
57567d7a0b
71 files changed
+11331
-443
No files matched your search
@@ -40,7 +40,8 @@ export function onAppMessage(kind, handler) {
|
||||
/**
|
||||
* Hear the app's answers to the Implementation Loop's named requests:
|
||||
* `loop-facts` (what agent a loop would use), `loop-start-result`,
|
||||
* `loop-notify-test-result` and the three stop-screen results. `store` is the page object and `redraw` its
|
||||
* `loop-notify-test-result` and the three stop-screen results, then the Review Loop's
|
||||
* `review-loop-facts` and `review-loop-start-result`. `store` is the page object and `redraw` its
|
||||
* render; they are handed in so this file keeps importing nothing.
|
||||
*/
|
||||
export function wireLoopMessages(store, redraw) {
|
||||
@@ -59,6 +60,31 @@ export function wireLoopMessages(store, redraw) {
|
||||
store.loopStart = { ok: data.ok === true, error: data.ok === true ? null : String(data.error || "The app did not start the loop.") };
|
||||
redraw();
|
||||
});
|
||||
// The Review Loop's own answers: its facts, and the result of its Start.
|
||||
onAppMessage("review-loop-facts", (data) => {
|
||||
store.reviewFacts = data.facts && typeof data.facts === "object" ? data.facts : null;
|
||||
redraw();
|
||||
});
|
||||
onAppMessage("review-loop-start-result", (data) => {
|
||||
// Cancel in the app's confirm: nothing started, so the setup is as it was.
|
||||
if (data.ok === true && data.started === false) {
|
||||
store.reviewStart = null;
|
||||
if (store.reviewLoopSetup) store.reviewLoopSetup.starting = false;
|
||||
redraw();
|
||||
return;
|
||||
}
|
||||
store.reviewStart = { ok: data.ok === true, error: data.ok === true ? null : String(data.error || "The app did not start the Review Loop.") };
|
||||
if (!store.reviewStart.ok && store.reviewLoopSetup) store.reviewLoopSetup.starting = false;
|
||||
redraw();
|
||||
});
|
||||
// The end screen's presses (Continue, Keep or Discard, Sign off, the finished
|
||||
// screen's next step): the answer clears the pressed state and keeps any error.
|
||||
for (const kind of ["review-loop-continue-result", "review-loop-partial-result", "review-loop-sign-off-result", "review-loop-next-result"]) {
|
||||
onAppMessage(kind, (data) => {
|
||||
store.reviewAction = { kind, ok: data.ok === true, error: data.ok === true ? null : String(data.error || "The app could not do that.") };
|
||||
redraw();
|
||||
});
|
||||
}
|
||||
onAppMessage("loop-notify-test-result", (data) => {
|
||||
store.loopNotifyTest = { waiting: false, ok: data.ok === true, sent: data.sent === true, error: data.ok === true ? null : String(data.error || "The app could not send the test.") };
|
||||
redraw();
|
||||
|
||||
Reference in new issue
Block a user