aboutsummaryrefslogtreecommitdiff
path: root/src/registry.ts
blob: a635042cddb2a97fdb84e2c8a4b3796956eb9247 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import type { ExtensionAPI } from "@mariozechner/pi-coding-agent";
import type { BrowserClient } from "./client";
import { type AnyBrowserToolDefinition, registerBrowserTool } from "./util/tool";
import { clickTool } from "./domains/click";
import { typeTool, pressKeyTool, dispatchKeyTool } from "./domains/keyboard";
import { scrollTool } from "./domains/scroll";

const TOOLS: ReadonlyArray<AnyBrowserToolDefinition> = [
  clickTool,
  typeTool,
  pressKeyTool,
  dispatchKeyTool,
  scrollTool,
];

export const registerAllTools = (pi: ExtensionAPI, client: BrowserClient): void => {
  for (const t of TOOLS) registerBrowserTool(pi, client, t);
};