normal-computing / fuji-web

Fuji is an AI agent that lives in your browser's sidepanel. You can now get tasks done online with a single command!
Apache License 2.0
191 stars 13 forks source link

[benchmarking] Establish and test messaging connection #157

Open lynchee-owo opened 2 months ago

lynchee-owo commented 2 months ago

disclaimer: this is for benchmarking

Establish a reliable messaging channel between the Python script and the WebWand Chrome extension.

Once we are sure messaing connection is established, we can:

Note: think about how to deal with the state manament.

sample code: chrome.runtime.onMessage.addListener((message) => { if (message.action === "openSidePanel"){ // code to operate and send message } }

Note: check out the native messaging which enables an extension to exchange messages with a native application, installed on the user's computer. The native messaging serves the extensions without additional accesses over the web.