fix(coding-agent): align python prompt mode detection
This commit is contained in:
@@ -251,6 +251,23 @@ describe("InputController keybinding setup", () => {
|
||||
expect(spies.resetDisplay).toHaveBeenCalledTimes(1);
|
||||
});
|
||||
|
||||
it("does not mark pasted shell prompts as Python mode while editing", async () => {
|
||||
const { InputController, ctx, editor } = await createContext();
|
||||
const controller = new InputController(ctx);
|
||||
|
||||
controller.setupKeyHandlers();
|
||||
|
||||
editor.onChange?.("$ cd ~/project && sudo ./build-and-push.sh o5.7 2>&1 | tail -4");
|
||||
|
||||
expect(ctx.isPythonMode).toBe(false);
|
||||
expect(ctx.updateEditorBorderColor).not.toHaveBeenCalled();
|
||||
|
||||
editor.onChange?.("$ print(1)");
|
||||
|
||||
expect(ctx.isPythonMode).toBe(true);
|
||||
expect(ctx.updateEditorBorderColor).toHaveBeenCalledTimes(1);
|
||||
});
|
||||
|
||||
it("registers retry as an editor action and retries the failed turn", async () => {
|
||||
const { InputController, ctx, editor, spies } = await createContext();
|
||||
const controller = new InputController(ctx);
|
||||
|
||||
Reference in New Issue
Block a user