diff --git a/README.md b/README.md index 4e9fb56..3f93500 100644 --- a/README.md +++ b/README.md @@ -73,7 +73,47 @@ All your data is stored locally on your hard drive. ## Localhost -You can run Extension OS using Ollama on your device; Download ollama and the model beforehand. +To utilize the localhost option and perform LLM inference, you must set up a local Ollama server. You can download and install Ollama along with the CLI [here](https://ollama.ai/). + +### Pull Image + +Example: + +``` +ollama pull llama3.1 +``` + +### Start Server + +Example: + +``` +OLLAMA_ORIGINS=chrome-extension://* ollama serve +``` + +**Important**: You need to configure the environment variable `OLLAMA_ORIGINS` to `chrome-extension://*` to permit requests from the Chrome extension. If `OLLAMA_ORIGINS` is not correctly configured, you will encounter an error in the Chrome extension. + +**Secutity** the `*` in `chrome-extension://*` should be replaced with the extension id. If you have downloaded Extension | OS from chrome, please use `chrome-extension://bahjnakiionbepnlbogdkojcehaeefnp` + +### macOS + +Run `launchctl setenv` to set `OLLAMA_ORIGINS`. + +``` +launchctl setenv OLLAMA_ORIGINS "chrome-extension://bahjnakiionbepnlbogdkojcehaeefnp" +``` + +[Setting environment variables on Mac (Ollama)](https://github.com/ollama/ollama/blob/main/docs/faq.md#setting-environment-variables-on-mac) + +### Docker + +The Ollama server can also be [run in a Docker container](https://hub.docker.com/r/ollama/ollama). The container should have the `OLLAMA_ORIGINS` environment variable set to `chrome-extension://*`. + +Run `docker run` with the `-e` flag to set the `OLLAMA_ORIGINS` environment variable: + +``` +docker run -e OLLAMA_ORIGINS="chrome-extension://bahjnakiionbepnlbogdkojcehaeefnp" -d -v ollama:/root/.ollama -p 11434:11434 --name ollama ollama/ollama +``` ## To-Do List @@ -143,12 +183,17 @@ Move it somewhere else ASAP: # Changelog +### 0.0.22 + +- Fixed the X,Y positioning in page like LinkedIn, Reddit and so on. +- The declarativeNetRequest has been removed to enhance the release lifecycle in light of Chrome Store authorization requirements. Ollama continue to be fully supported, and detailed configuration instructions can be found in the README. + ### 0.0.21 - Chaged the introductory GIF demonstrating how to use the Extension | OS. - PromptFactory: Implemented a notification to inform users that any selected text will be automatically appended to the end of the prompt. - Settings: Using Switch vs CheckBoxes -- Implemented anonymous tracking to monitor usage patterns, including the most frequently used models and vendors. +- Implemented optional (disabled by default) anonymous tracking to monitor usage patterns, including the most frequently used models and vendors. ### 0.0.20 diff --git a/assets/showcase/action.png b/assets/showcase/action.png index f2e05ac..77bf52d 100644 Binary files a/assets/showcase/action.png and b/assets/showcase/action.png differ diff --git a/assets/showcase/v0.0.20/action.png b/assets/showcase/v0.0.20/action.png new file mode 100644 index 0000000..f2e05ac Binary files /dev/null and b/assets/showcase/v0.0.20/action.png differ diff --git a/lib/anonymousTracking.ts b/lib/anonymousTracking.ts index c7b8a60..f6d6d66 100644 --- a/lib/anonymousTracking.ts +++ b/lib/anonymousTracking.ts @@ -22,7 +22,6 @@ export const insertStatisticsRow = async (table: string, data: any) => { if (!response.ok) { const errorData = await response.json(); - console.log(errorData); console.error("Error inserting row:", errorData); return { success: false, diff --git a/lib/calculationXY.ts b/lib/calculationXY.ts index c49e09a..e78a99c 100644 --- a/lib/calculationXY.ts +++ b/lib/calculationXY.ts @@ -32,7 +32,6 @@ export function getRealXY(e: MouseEvent): XYCoords { pageY = e.pageY - (e.clientY - window.innerHeight); clientY = window.innerHeight; } - return { pageX, pageY, clientX, clientY }; } @@ -45,14 +44,9 @@ export function adjustXYSelectionMenu(coords: XYCoords) { // // Check for right edge case if (coords.clientX + menuWidth > viewportWidth) { coords.pageX = Math.max(coords.pageX - menuWidth, 0); - coords.pageY += visualGap; } else { coords.pageX += visualGap; } - // Check for bottom edge case - if (coords.clientY + menuHeight > window.innerHeight) { - coords.pageY = Math.max(coords.pageY - menuHeight, 0); - } - return { xPos: coords.pageX, yPos: coords.pageY }; + return { xPos: coords.pageX, yPos: coords.clientY }; } diff --git a/package.json b/package.json index 8a89068..620c2ac 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "extension-os", "displayName": "Extension-OS: Your AI Partner", - "version": "0.0.21", + "version": "0.0.22", "description": "AI at Your Fingertips, Anytime, Anywhere.", "author": "acubeddu87@gmail.com", "scripts": { @@ -64,18 +64,8 @@ "contextMenus", "clipboard", "sidePanel", - "declarativeNetRequest", "identity", "identity.email" - ], - "declarative_net_request": { - "rule_resources": [ - { - "id": "ruleset_1", - "enabled": true, - "path": "~rules/ollama.json" - } - ] - } + ] } }