Skip to content

Commit

Permalink
Merge pull request #404 from n4ze3m/next
Browse files Browse the repository at this point in the history
v1.5.1
  • Loading branch information
n4ze3m authored Feb 16, 2025
2 parents 599a477 + 9e0290d commit 08b84e3
Show file tree
Hide file tree
Showing 67 changed files with 1,124 additions and 330 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,6 @@ keys.json
# WXT
.wxt
# WebStorm
.idea
.idea

/docs/.vitepress/cache/
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ This will start a development server and watch for changes in the source files.
| Brave ||||
| Firefox ||||
| Vivaldi ||||
| Edge || ||
| Edge || ||
| LibreWolf ||||
| Zen Browser ||||
| Opera ||||
Expand Down
Binary file modified bun.lockb
Binary file not shown.
86 changes: 86 additions & 0 deletions docs/.vitepress/config.mts
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
import { defineConfig } from 'vitepress'

// https://vitepress.dev/reference/site-config
export default defineConfig({
title: "Page Assist",
description: "Page Assist is an open-source Chrome Extension that provides a Sidebar and Web UI for your Local AI model. It allows you to interact with your model from any webpage.",
lastUpdated: true,
themeConfig: {
// https://vitepress.dev/reference/default-theme-config
search: {
provider: "local",
},
editLink: {
pattern: "https://github.com/n4ze3m/page-assist/edit/main/docs/:path",
text: "Edit this page on GitHub"
},
nav: [
{ text: 'Home', link: '/' },
],

sidebar: [
{
text: 'Guide',
items: [
{ text: 'Welcome to Page Assist', link: '/' },
{
text: "Browser Support",
link: "/browser-support"
},
{
text: "Keyboard Shortcuts",
link: "/shortcuts"
}
],
},
{
text: "Sidebar",
items: [
{
text: "Sidebar Settings",
link: "/sidebar"
},
{
text: "Sidebar Copilot",
link: "/sidebar/copilot"
}
],
},
{
text: "Providers",
items: [
{
text: "Ollama",
link: "/providers/ollama"
},
{
text: "LM Studio",
link: "/providers/lmstudio"
},
{
text: "OpenAI Compatible API",
link: "/providers/openai"
}
]
},
{
text: "Troubleshooting",
items: [
{
text: "Ollama Connection Issue",
link: "/connection-issue"
}
]
}],

socialLinks: [
{ icon: 'github', link: 'https://github.com/n4ze3m/page-assist' },
{ icon: 'x', link: 'https://x.com/page_assist' },
{ icon: 'discord', link: 'https://discord.gg/bu54382uBd' },
],
footer: {
message: "MIT Licensed Open Source Project",
copyright: "Copyright © 2025 Muhammed Nazeem & Page Assist Contributors",
},
},
})
49 changes: 49 additions & 0 deletions docs/api-examples.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
outline: deep
---

# Runtime API Examples

This page demonstrates usage of some of the runtime APIs provided by VitePress.

The main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files:

```md
<script setup>
import { useData } from 'vitepress'

const { theme, page, frontmatter } = useData()
</script>

## Results

### Theme Data
<pre>{{ theme }}</pre>

### Page Data
<pre>{{ page }}</pre>

### Page Frontmatter
<pre>{{ frontmatter }}</pre>
```

<script setup>
import { useData } from 'vitepress'

const { site, theme, page, frontmatter } = useData()
</script>

## Results

### Theme Data
<pre>{{ theme }}</pre>

### Page Data
<pre>{{ page }}</pre>

### Page Frontmatter
<pre>{{ frontmatter }}</pre>

## More

Check out the documentation for the [full list of runtime APIs](https://vitepress.dev/reference/runtime-api#usedata).
18 changes: 18 additions & 0 deletions docs/browser-support.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Browser Support

For the best experience, we recommend using Page Assist with the latest versions of Google Chrome, Microsoft Edge, or Firefox.


## Supported Browsers

| Browser | Sidebar | Chat With Webpage | Web UI |
| ----------- | ------- | ----------------- | ------ |
| Chrome ||||
| Brave ||||
| Firefox ||||
| Vivaldi ||||
| Edge ||||
| LibreWolf ||||
| Zen Browser ||||
| Opera ||||
| Arc ||||
50 changes: 41 additions & 9 deletions docs/connection-issue.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ Connection issues can be caused by a number of reasons. Here are some common iss
### 2. `403` Error When Sending a Message
![403 error when sending a message](https://image.pageassist.xyz/Screenshot%202024-05-13%20001940.png)

This issue usually occurs when Ollama is not running on [http://127.0.0.1:11434/](http://127.0.0.1:11434/), and the connection is from the private network or a different network.
This issue because of CORS (Cross-Origin Resource Sharing) issues. Since Page Assist is a browser extension, it needs to communicate with the server through the browser. However, the browser restricts communication between different origins. To resolve this issue, you can try the following solutions:

### Solutions
## 1. Solutions

Since Ollama has connection issues when directly accessed from the browser extension, Page Assist rewrites the request headers to make it work. However, automatic rewriting of headers only works on `http://127.0.0.1:*` and `http://localhost:*` URLs. To resolve the connection issue, you can try the following solutions:

Expand All @@ -26,17 +26,49 @@ Since Ollama has connection issues when directly accessed from the browser exten

![Enable or Disable Custom Origin URL](https://image.pageassist.xyz/Screenshot%202024-05-13%20003225.png)

5. (Optional) If Ollama is running on a different port or host, then change the URL in the `Custom Origin URL` field; otherwise, leave it as it is.
:::tip
If Ollama is running on a different port or host, then change the URL in the `Custom Origin URL` field; otherwise, leave it as it is. But you need to enable it - do not change the URL
:::

6. Make sure click on the `Save` button to save the changes.
5. Make sure click on the `Save` button to save the changes.

This will resolve the connection issue, and you will be able to use Ollama without any issues on Page Assist ❤
_This will resolve the connection issue, and you will be able to use Ollama without any issues on Page Assist_

7. If you are still facing issues, you can try the following steps:
## 2. Solution

You can set OLLAMA_ORIGIN=* to allow connections from any origin. Here's how to do it on different operating systems:

### Windows
1. Open Start menu and search for "Environment Variables"
2. Click "Edit the system environment variables"
3. Click "Environment Variables" button
4. Under "System Variables" click "New"
5. Set Variable name: `OLLAMA_ORIGIN` and Variable value: `*`
6. Click OK to save
7. Restart Ollama service


### MacOS

1. Open Terminal
2. Run the following command:

```bash
launchctl setenv OLLAMA_ORIGIN "*"
```
3. Restart Ollama service

### Linux
1. Open Terminal
2. Run the following command:

```bash
export OLLAMA_ORIGIN="*"
```
3. Restart Ollama service

_This will allow connections from any origin. Hopefully, this will resolve the connection issue._

- Add `OLLAMA_HOST=0.0.0.0` to the environment variables of Ollama.
- Restart Ollama.
- Try again.


If you still face any issues, feel free to contact us [here](https://github.com/n4ze3m/page-assist/issues/new), and we will be happy to help you out.
20 changes: 20 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Welcome to Page Assist

Welcome to Page Assist, the browser companion for your Local AI model! With Page Assist, your web browsing experience enters a new dimension of intelligence and efficiency.

## Quick Start Guide

Page Assist makes AI interaction a breeze! Simply:
- Chat with your AI from any webpage using our sleek Sidebar
- Access the powerful Web UI control center
- Connect to your favorite local AI models

## Get Page Assist Today!

Download for your favorite browser:

[![Chrome Web Store](https://pub-35424b4473484be483c0afa08c69e7da.r2.dev/UV4C4ybeBTsZt43U4xis.png)](https://chrome.google.com/webstore/detail/page-assist/jfgfiigpkhlkbnfnbobbkinehhfdhndo)

[![Firefox Add-on](https://pub-35424b4473484be483c0afa08c69e7da.r2.dev/get-the-addon.png)](https://addons.mozilla.org/en-US/firefox/addon/page-assist/)

[![Edge Add-on](https://pub-35424b4473484be483c0afa08c69e7da.r2.dev/edge-addon.png)](https://microsoftedge.microsoft.com/addons/detail/page-assist-a-web-ui-fo/ogkogooadflifpmmidmhjedogicnhooa)
85 changes: 85 additions & 0 deletions docs/markdown-examples.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# Markdown Extension Examples

This page demonstrates some of the built-in markdown extensions provided by VitePress.

## Syntax Highlighting

VitePress provides Syntax Highlighting powered by [Shiki](https://github.com/shikijs/shiki), with additional features like line-highlighting:

**Input**

````md
```js{4}
export default {
data () {
return {
msg: 'Highlighted!'
}
}
}
```
````

**Output**

```js{4}
export default {
data () {
return {
msg: 'Highlighted!'
}
}
}
```

## Custom Containers

**Input**

```md
::: info
This is an info box.
:::

::: tip
This is a tip.
:::

::: warning
This is a warning.
:::

::: danger
This is a dangerous warning.
:::

::: details
This is a details block.
:::
```

**Output**

::: info
This is an info box.
:::

::: tip
This is a tip.
:::

::: warning
This is a warning.
:::

::: danger
This is a dangerous warning.
:::

::: details
This is a details block.
:::

## More

Check out the documentation for the [full list of markdown extensions](https://vitepress.dev/guide/markdown).
24 changes: 24 additions & 0 deletions docs/providers/lmstudio.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# LM Studio

You can add LMStudio's API to Page Assist. Here's how you can do it:

1. Click on the Page Assist icon on the browser toolbar.

2. Click on the `Settings` icon.

3. Go to the `OpenAI Compatible API` tab.

4. Click on the `Add Provider` button.

5. Select `LMStudio` from the dropdown.

6. Enter the `LMStudio URL`. (by default it is `http://localhost:1234/v1`)

7. Click on the `Save` button.


::: info
You don't need to add any models since Page Assist will automatically fetch them from the LMStudio instance you have configured.

The model must be loaded in LMStudio before Page Assist can fetch it.
:::
Loading

0 comments on commit 08b84e3

Please sign in to comment.