-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: Simplify the codebase with functional Overleaf implementati…
…on (#2) Simplify and refactor the entire codebase to the new architecture. --------- Co-authored-by: YiyanZhai <zhaiyiyan17@gmail.com>
- Loading branch information
1 parent
18caed0
commit 0a8a210
Showing
39 changed files
with
272 additions
and
10,908 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,55 @@ | ||
# web-agent-interface | ||
# Web-Agent-Interface Library | ||
|
||
## Overview | ||
|
||
The `web-agent-interface` library provides an API to interact with text selections, modifications, and other functionalities across different web platforms like Overleaf, Google Docs, and Google Calendar. This library makes it easier to customize your tools. | ||
|
||
## Supported Platforms | ||
|
||
- **Overleaf**: Manipulate text selections and content within Overleaf documents. | ||
<!-- - **Google Docs (GDoc)**: Interact with text selections and modifications in Google Docs. | ||
- **Google Calendar (GCal)**: Integrate and manage events on Google Calendar. --> | ||
|
||
## Installation | ||
|
||
To install and build the library, follow these steps: | ||
|
||
1. Clone the repository: | ||
|
||
```bash | ||
git clone https://github.com/mlc-ai/web-agent-interface.git | ||
cd web-agent-interface | ||
``` | ||
|
||
2. Install dependencies and build the project: | ||
|
||
```bash | ||
npm install | ||
npm run build | ||
``` | ||
|
||
## Usage | ||
|
||
### 1. Initialize the page handler in content script | ||
|
||
```javascript | ||
import { initHandler } from '@mlc-ai/web-agent-interface'; | ||
const handler = initHandler(); | ||
``` | ||
### 2. Get Available Tools | ||
```javascript | ||
import { getTools } from '@mlc-ai/web-agent-interface'; | ||
const availableTools = getTools(); | ||
``` | ||
### 3. Handling Tool Use | ||
```javascript | ||
const observation = handler.handleToolCall(toolName, parameters); | ||
console.log("Got observation:", observation); | ||
``` |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import eslint from "eslint"; | ||
|
||
const { ESLint } = eslint; | ||
|
||
export default new ESLint({ | ||
baseConfig: { | ||
env: { | ||
browser: true, | ||
es2021: true, | ||
node: true, | ||
}, | ||
extends: ["eslint:recommended"], | ||
parserOptions: { | ||
ecmaVersion: 2021, | ||
sourceType: "module", | ||
}, | ||
rules: { | ||
"no-unused-vars": "warn", | ||
"no-console": "off", | ||
indent: ["error", 2], | ||
quotes: ["error", "single"], | ||
semi: ["error", "always"], | ||
}, | ||
}, | ||
}); |
Oops, something went wrong.