diff options
| author | amankumarsingh77 <amankumarsingh7702@gmail.com> | 2026-07-28 22:00:33 +0530 |
|---|---|---|
| committer | Aman Kumar <145339995+amankumarsingh77@users.noreply.github.com> | 2026-08-02 19:12:46 +0530 |
| commit | 86045450c208bc51670dd9554e581f2a62b181c9 (patch) | |
| tree | 6e1ee7617afd829549ade41e527f07155921a47e /src/domains/form-batch.ts | |
| parent | 632600ec0a0a68d9327e19bd419a1ae72047955f (diff) | |
refactor: helpers live in helper modules, not in tool files
form.ts exported resolveAndCall and detailsOf to form-batch.ts,
snapshot.ts exported buildTree and collectInteractiveTargets to
ref-resolve.ts, and screenshot.ts exported captureWithCrosshair to
click.ts — so importing one tool pulled in another tool's whole module.
The shared halves move out: ax-tree.ts (the AX tree model, its
construction and the queries over it), element-call.ts (calling a
function on a resolved element, and the PageResult it returns),
screenshot-capture.ts (capture, resize, crosshair overlay). Each tool
file now holds its tools and its own presentation, nothing else.
NavOutcome stops being exported; nothing outside navigate.ts read it.
target.ts stays a module rather than folding into click.ts as planned:
it is already helper-only and has its own test suite, and moving a tested
pure function into a tool file is the thing this commit removes. Having
one consumer is not the defect.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'src/domains/form-batch.ts')
| -rw-r--r-- | src/domains/form-batch.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/domains/form-batch.ts b/src/domains/form-batch.ts index 1d49cf6..567108b 100644 --- a/src/domains/form-batch.ts +++ b/src/domains/form-batch.ts @@ -2,7 +2,7 @@ import { Type } from "typebox"; import { type Result, err, ok } from "../util/result"; import { defineBrowserTool, type ToolErr, type ToolOk } from "../util/tool"; import { fillDeclaration } from "./fill-engine"; -import { detailsOf, resolveAndCall } from "./form"; +import { detailsOf, resolveAndCall } from "./element-call"; const FILL_FN = fillDeclaration({ rejectSelect: false, focusFirst: true }); |
