feat(vom): actions refactor

This commit is contained in:
Ljy-0827
2026-08-28 17:27:56 +08:00
committed by GitHub
parent e325ae3842
commit 21b1debc29
7 changed files with 329 additions and 190 deletions
@@ -377,12 +377,12 @@ describe("interaction tools", () => {
emulate: { tab_id: 7, cleared: false },
};
it("browser_click maps target, button, and click count", async () => {
it("browser_click maps target, button, click count, and modifiers", async () => {
const { tools, calls } = setup(responses);
await startSession(tools);
const click = tools.get("browser_click");
const value = (await click?.execute(
{ target: "@e1", button: "right", clickCount: 2 },
{ target: "@e1", button: "right", clickCount: 2, modifiers: ["ctrl", "shift"] },
makeExec(),
)) as { session: string; x: number; y: number };
expect(value).toMatchObject({ session: "s1", x: 10, y: 20 });
@@ -394,6 +394,8 @@ describe("interaction tools", () => {
"right",
"--click-count",
"2",
"--modifiers",
"ctrl,shift",
"@e1",
]);
});