Skip to content

Commit

Permalink
v0.0.22 (#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
albertocubeddu authored Aug 22, 2024
1 parent a4dbabf commit 67f45cd
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 22 deletions.
49 changes: 47 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down
Binary file modified assets/showcase/action.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/showcase/v0.0.20/action.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion lib/anonymousTracking.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
8 changes: 1 addition & 7 deletions lib/calculationXY.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 };
}

Expand All @@ -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 };
}
14 changes: 2 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
@@ -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": "[email protected]",
"scripts": {
Expand Down Expand Up @@ -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"
}
]
}
]
}
}

0 comments on commit 67f45cd

Please sign in to comment.