mirror of
https://github.com/jparkerweb/plan2code.git
synced 2026-11-17 04:45:33 -08:00
Get past a stuck continue or a failed send in one step
AI Assisted
This commit is contained in:
1 parent
7a9f56a452
commit
3e22d53bf5
8 files changed
+266
-17
No files matched your search
@@ -11,7 +11,7 @@ import assert from "node:assert/strict";
|
||||
import fs from "node:fs";
|
||||
import path from "node:path";
|
||||
import { fileURLToPath, pathToFileURL } from "node:url";
|
||||
import { barNextSteps, defaultRightFraction, folderName, windowTitleFor, CONSOLE_ASIDE_BREAKPOINT_PX, NEXT_STEP_LABELS } from "../plan2code-app/ui/meter.js";
|
||||
import { barNextSteps, continueKeys, defaultRightFraction, folderName, windowTitleFor, CONSOLE_ASIDE_BREAKPOINT_PX, NEXT_STEP_LABELS } from "../plan2code-app/ui/meter.js";
|
||||
import { findBrowser, launchBrowser } from "./browser.mjs";
|
||||
|
||||
const HERE = path.dirname(fileURLToPath(import.meta.url));
|
||||
@@ -69,6 +69,22 @@ test("app.js draws the bar's right end through barNextSteps, not a hand-rolled c
|
||||
}
|
||||
});
|
||||
|
||||
// Claude Code holds typed text as a queued message while its turn is busy,
|
||||
// and the continue button only shows once the agent stopped checking in, so
|
||||
// by then the turn is stuck and the queued word would never send by itself.
|
||||
test("continueKeys types continue and Enter, and under Claude Code also its send-now chord (ctrl+x ctrl+s)", () => {
|
||||
assert.deepEqual(continueKeys("claude"), ["continue", "\r", "\x18\x13"]);
|
||||
for (const kind of ["devin", "codex", null, undefined, "something-new"]) {
|
||||
assert.deepEqual(continueKeys(kind), ["continue", "\r"], `${kind} gets the plain word and Enter`);
|
||||
}
|
||||
});
|
||||
|
||||
test("app.js types the continue button's keystrokes through continueKeys, for the running agent's kind", () => {
|
||||
const typeContinue = APP_JS.slice(APP_JS.indexOf("function typeContinue"), APP_JS.indexOf("function typeContinue") + 800);
|
||||
assert.match(typeContinue, /continueKeys\(agent\.kind\)/, "the keystrokes come from continueKeys");
|
||||
assert.doesNotMatch(typeContinue, /data: 'continue'/, "no hand-typed word left beside it");
|
||||
});
|
||||
|
||||
test("the bar reads project menu, New Session, agent menu, with both menus outside the scrolling row", () => {
|
||||
const row = INDEX_HTML.slice(INDEX_HTML.indexOf('<div id="bar-row">'), INDEX_HTML.indexOf('<div id="project-menu"'));
|
||||
const at = (id) => row.indexOf(`id="${id}"`);
|
||||
|
||||
Reference in new issue
Block a user