From b9a3827de77a089dedd24026a20f4b719a9f04b9 Mon Sep 17 00:00:00 2001 From: Nestor Qin Date: Sat, 12 Oct 2024 23:11:42 -0400 Subject: [PATCH] feat: rename tools --- src/index.ts | 2 +- src/page/overleaf.ts | 6 +++--- src/tool.ts | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/index.ts b/src/index.ts index 90b74c8..f87efb5 100644 --- a/src/index.ts +++ b/src/index.ts @@ -32,4 +32,4 @@ export const getAvailableTools = () => { console.error("[Web Agent Interface] No tools found for the current page"); }; -export * as Overleaf from './page/overleaf'; \ No newline at end of file +export * as Overleaf from "./page/overleaf"; diff --git a/src/page/overleaf.ts b/src/page/overleaf.ts index 75f1dd9..c658092 100644 --- a/src/page/overleaf.ts +++ b/src/page/overleaf.ts @@ -87,7 +87,7 @@ export class PageHandler implements IPageHandler { } export const availableTools: ToolName[] = [ - "getSelection", - "replaceSelection", - "appendText", + "getSelectedText", + "replaceSelectedText", + "appendTextToDocument", ]; diff --git a/src/tool.ts b/src/tool.ts index 69f619b..37c7080 100644 --- a/src/tool.ts +++ b/src/tool.ts @@ -1,6 +1,6 @@ const tools: Record = { getSelection: { - name: "getSelection", + name: "getSelectedText", displayName: "Get Selected Text", description: "Get the user's current selected text content on the document.", @@ -15,7 +15,7 @@ const tools: Record = { }, }, replaceSelection: { - name: "replaceSelection", + name: "replaceSelectedText", displayName: "Replace Selected Text", description: "Replace the user's current selected text content on the document with new text content.", @@ -36,7 +36,7 @@ const tools: Record = { }, }, appendText: { - name: "appendText", + name: "appendTextToDocument", displayName: "Append New Text", description: "Add some text content to the end of the document.", schema: {